コード例 #1
0
ファイル: compiler.php プロジェクト: kosmosby/medicine-prof
	public static function getInstance()
	{
		if( is_null( self::$instance ) )
		{
			self::$instance	= new self();
		}

		return self::$instance;
	}
コード例 #2
0
	public function attach()
	{
		if (self::$attached) return;

		parent::attach();

		if ($this->environment !== 'development')
		{
			// Get resources
			$compiler = new KomentoCompiler();
			$resource = $compiler->getResources();

			// Attach resources
			if (!empty($resource)) {

				$scriptTag = $this->createScriptTag($resource["uri"]);

				$document = JFactory::getDocument();
				$document->addCustomTag($scriptTag);
			}
		}

		self::$attached = true;
	}