Beispiel #1
0
 /** 
  * Checks if a handle exists
  *
  * This method is used to validate whether or not a handle is
  * available for a new user.
  *
  * @param  string $handle  The handle to validate.
  * @return boolean True if the user is free and false if the handle is taken.
  */
 public function handleAvailable($handle)
 {
     $user = $this->config->getByField('user', 'handle', $handle);
     if (isset($user) && $user !== false) {
         return false;
     }
     return true;
 }
Beispiel #2
0
 /**
  * Get an action
  *
  * This method is used to retrieve information about an
  * action using it's hash-id.
  *
  * @param  string $id The id of the action to retrieve.
  * @return mixed  Either an array with all the information related
  *                to an action or a boolean false when nothing is found.
  */
 public function get($id)
 {
     $action = $this->config->getByField('action', 'hash', $id);
     return isset($action) ? $action : false;
 }
Beispiel #3
0
 /**
  * Get a mimetype
  *
  * This method is used to retrieve information about a
  * mimetype using it's hash-id.
  *
  * @param  string $id The id of the mimetype to retrieve.
  * @return mixed  Either an array with all the information related
  *                to a mimetype or a boolean false when nothing is found.
  */
 public function get($id)
 {
     $mimetype = $this->config->getByField('mimetype', 'hash', $id);
     return isset($mimetype) ? $mimetype : false;
 }