コード例 #1
0
 /**
  * Returns the allowed file extensions.
  *
  * @return mixed	The extension map or false
  */
 protected function getAllowedFileExtensions()
 {
     if (!is_null($this->allowedExtensions) && $this->allowedExtensions instanceof Map && $this->allowedExtensions->size() > 0) {
         return $this->allowedExtensions->trim();
     }
     return false;
 }
コード例 #2
0
ファイル: Relation.php プロジェクト: enriquesomolinos/Bengine
 /**
  * Checks an relation to the indicated user.
  *
  * @param integer $userid
  *
  * @return boolean	True if a relation exists, false if not
  */
 protected function getPlayerRelation($userid)
 {
     if (!$userid || !$this->userid) {
         return false;
     }
     $this->loadPlayerRelations();
     if ($this->players->size() > 0 && $this->players->contains($userid)) {
         return true;
     }
     return false;
 }