コード例 #1
0
 /**
  * This magic method provides a shortcut for magicprops
  *
  * @param string $prop Name of the magic property to look for.
  * @return mixed Returns the requested magic property or FALSE if it was
  * not found.
  */
 public function __get($prop)
 {
     //
     // Default values.
     $out = false;
     //
     // Looking for the requested property.
     try {
         $out = MagicProp::Instance()->{$prop};
     } catch (MagicPropException $ex) {
         //
         // Ignored to avoid unnecessary issues.
     }
     return $out;
 }
コード例 #2
0
 protected function init()
 {
     parent::init();
     $this->_magic = \TooBasic\MagicProp::Instance();
 }
コード例 #3
0
function enableSearch()
{
    global $Search;
    \TooBasic\MagicProp::Instance()->representation->tags(false, 'Tagger');
    $Search[GC_SEARCH_ENGINE_FACTORIES][TAGGER_SEARCH_TYPE] = 'Tagger\\TagsFactory';
}
コード例 #4
0
 /**
  * This method provides access to a MagicProp instance shortcut.
  *
  * @return \TooBasic\MagicProp Returns the shortcut.
  */
 protected function magic()
 {
     if ($this->_magic === false) {
         $this->_magic = MagicProp::Instance();
     }
     return $this->_magic;
 }