public function opposites($user, $others = [], $database = null)
    {
        $model = $this->noInitModel;
        $query = $this->andWhere([$model->otherGuidAttribute => BaseUserModel::compositeGUIDs($user)]);
        /* @var $query static */
        if (!empty($others)) {
            $query = $query->andWhere([$model->createdByAttribute => BaseUserModel::compositeGUIDs($others)]);
        }
        return $query->all($database);
    }
public function opposites($user, $others = [], $database = null)
    {
        $model = $this->noInitModel;
        $query = $this->andWhere([$model->otherGuidAttribute => BaseUserModel::compositeGUIDs($user)]);
        /* @var $query static */
        if (!empty($others)) {
            $query = $query->andWhere([$model->createdByAttribute => BaseUserModel::compositeGUIDs($others)]);
        }
        return $query->all($database);
    }
public function opposites ( $ user , $ others = [ ] , $ database = null ) { $ model = $ this -> noInitModel ; $ query = $ this -> andWhere ( [ $ model -> otherGuidAttribute => BaseUserModel :: compositeGUIDs ( $ user ) ] ) ; /* @var $query static */ if ( ! empty ( $ others ) ) { $ query = $ query -> andWhere ( [ $ model -> createdByAttribute => BaseUserModel :: compositeGUIDs ( $ others ) ] ) ; } return $ query -> all ( $ database ) ; }
Get all the opposites.
@param array|string $user initator.
@param array $others all recipients.
@param Connection $database
@return array instances.
Get all the opposites .