Exemplo n.º 1
0
	public function __set($name, $value)
	{
		if ($name == 'entryID')
		{
			$p = explode('/', $value, 3);
			
			CoOrg::loadPluginInfo('menu');
			if (!class_exists($p[0]))
			{
				$this->entryID_error = t('Provider not found');
				return;
			}
			
			$this->provider = $p[0];
			if (count($p) > 1)
			{
				$this->action = $p[1];
				
				if (count($p) > 2)
				{
					$this->data = $p[2];
				}
				else
				{
					$this->data = null;
				}
				$this->url = call_user_func(array($p[0], 'url'), $this->action, $this->language, $this->data);
			}
			else
			{
				$this->action = 'do';
				$this->url = call_user_func(array($p[0], 'url'), $this->data, $this->language);
			}
		}
		parent::__set($name, $value);
	}