original_string: public static function init() {
  		
  		// make sure config vars exist
  		if (!Config::getOption("patternExtension")) {
  			Console::writeError("the pattern extension config option needs to be set...");
  		}
  		
  		if (!Config::getOption("styleguideKit")) {
  			Console::writeError("the styleguideKit config option needs to be set...");
  		}
  		
  		// set-up config vars
  		$patternExtension        = Config::getOption("patternExtension");
  		$metaDir                 = Config::getOption("metaDir");
  		$styleguideKit           = Config::getOption("styleguideKit");
  		$styleguideKitPath       = Config::getOption("styleguideKitPath");
  		
  		if (!$styleguideKitPath || !is_dir($styleguideKitPath)) {
  			Console::writeError("your styleguide won't render because i can't find your styleguide files. are you sure they're at <path>".Console::getHumanReadablePath($styleguideKitPath)."</path>? you can fix this in <path>./config/config.yml</path> by editing styleguideKitPath...");
  		}
  		
  		// load pattern-lab's resources
  		$partialPath             = $styleguideKitPath.DIRECTORY_SEPARATOR."views".DIRECTORY_SEPARATOR."partials";
  		$generalHeaderPath       = $partialPath.DIRECTORY_SEPARATOR."general-header.".$patternExtension;
  		$generalFooterPath       = $partialPath.DIRECTORY_SEPARATOR."general-footer.".$patternExtension;
  		self::$htmlHead          = (file_exists($generalHeaderPath)) ? file_get_contents($generalHeaderPath) : "";
  		self::$htmlFoot          = (file_exists($generalFooterPath)) ? file_get_contents($generalFooterPath) : "";
  		
  		// gather the user-defined header and footer information
  		$patternHeadPath         = $metaDir.DIRECTORY_SEPARATOR."_00-head.".$patternExtension;
  		$patternFootPath         = $metaDir.DIRECTORY_SEPARATOR."_01-foot.".$patternExtension;
  		self::$patternHead       = (file_exists($patternHeadPath)) ? file_get_contents($patternHeadPath) : "";
  		self::$patternFoot       = (file_exists($patternFootPath)) ? file_get_contents($patternFootPath) : "";
  		
  		// add the filesystemLoader
  		$patternEngineBasePath   = PatternEngine::getInstance()->getBasePath();
  		$filesystemLoaderClass   = $patternEngineBasePath."\Loaders\FilesystemLoader";
  		
  		$options                 = array();
  		$options["templatePath"] = $styleguideKitPath.DIRECTORY_SEPARATOR."views";
  		$options["partialsPath"] = $options["templatePath"].DIRECTORY_SEPARATOR."partials";
  		
  		self::$filesystemLoader  = new $filesystemLoaderClass($options);
  		
  		$stringLoaderClass       = $patternEngineBasePath."\Loaders\StringLoader";
  		self::$stringLoader      = new $stringLoaderClass();
  		
  		// i can't remember why i chose to implement the pattern loader directly in classes
  		// i figure i had a good reason which is why it's not showing up here
  		
  	}
code: public static function init() {
  		
  		// make sure config vars exist
  		if (!Config::getOption("patternExtension")) {
  			Console::writeError("the pattern extension config option needs to be set...");
  		}
  		
  		if (!Config::getOption("styleguideKit")) {
  			Console::writeError("the styleguideKit config option needs to be set...");
  		}
  		
  		// set-up config vars
  		$patternExtension        = Config::getOption("patternExtension");
  		$metaDir                 = Config::getOption("metaDir");
  		$styleguideKit           = Config::getOption("styleguideKit");
  		$styleguideKitPath       = Config::getOption("styleguideKitPath");
  		
  		if (!$styleguideKitPath || !is_dir($styleguideKitPath)) {
  			Console::writeError("your styleguide won't render because i can't find your styleguide files. are you sure they're at <path>".Console::getHumanReadablePath($styleguideKitPath)."</path>? you can fix this in <path>./config/config.yml</path> by editing styleguideKitPath...");
  		}
  		
  		// load pattern-lab's resources
  		$partialPath             = $styleguideKitPath.DIRECTORY_SEPARATOR."views".DIRECTORY_SEPARATOR."partials";
  		$generalHeaderPath       = $partialPath.DIRECTORY_SEPARATOR."general-header.".$patternExtension;
  		$generalFooterPath       = $partialPath.DIRECTORY_SEPARATOR."general-footer.".$patternExtension;
  		self::$htmlHead          = (file_exists($generalHeaderPath)) ? file_get_contents($generalHeaderPath) : "";
  		self::$htmlFoot          = (file_exists($generalFooterPath)) ? file_get_contents($generalFooterPath) : "";
  		
  		// gather the user-defined header and footer information
  		$patternHeadPath         = $metaDir.DIRECTORY_SEPARATOR."_00-head.".$patternExtension;
  		$patternFootPath         = $metaDir.DIRECTORY_SEPARATOR."_01-foot.".$patternExtension;
  		self::$patternHead       = (file_exists($patternHeadPath)) ? file_get_contents($patternHeadPath) : "";
  		self::$patternFoot       = (file_exists($patternFootPath)) ? file_get_contents($patternFootPath) : "";
  		
  		// add the filesystemLoader
  		$patternEngineBasePath   = PatternEngine::getInstance()->getBasePath();
  		$filesystemLoaderClass   = $patternEngineBasePath."\Loaders\FilesystemLoader";
  		
  		$options                 = array();
  		$options["templatePath"] = $styleguideKitPath.DIRECTORY_SEPARATOR."views";
  		$options["partialsPath"] = $options["templatePath"].DIRECTORY_SEPARATOR."partials";
  		
  		self::$filesystemLoader  = new $filesystemLoaderClass($options);
  		
  		$stringLoaderClass       = $patternEngineBasePath."\Loaders\StringLoader";
  		self::$stringLoader      = new $stringLoaderClass();
  		
  		// i can't remember why i chose to implement the pattern loader directly in classes
  		// i figure i had a good reason which is why it's not showing up here
  		
  	}
code_tokens: public static function init ( ) { // make sure config vars exist if ( ! Config :: getOption ( "patternExtension" ) ) { Console :: writeError ( "the pattern extension config option needs to be set..." ) ; } if ( ! Config :: getOption ( "styleguideKit" ) ) { Console :: writeError ( "the styleguideKit config option needs to be set..." ) ; } // set-up config vars $ patternExtension = Config :: getOption ( "patternExtension" ) ; $ metaDir = Config :: getOption ( "metaDir" ) ; $ styleguideKit = Config :: getOption ( "styleguideKit" ) ; $ styleguideKitPath = Config :: getOption ( "styleguideKitPath" ) ; if ( ! $ styleguideKitPath || ! is_dir ( $ styleguideKitPath ) ) { Console :: writeError ( "your styleguide won't render because i can't find your styleguide files. are you sure they're at <path>" . Console :: getHumanReadablePath ( $ styleguideKitPath ) . "</path>? you can fix this in <path>./config/config.yml</path> by editing styleguideKitPath..." ) ; } // load pattern-lab's resources $ partialPath = $ styleguideKitPath . DIRECTORY_SEPARATOR . "views" . DIRECTORY_SEPARATOR . "partials" ; $ generalHeaderPath = $ partialPath . DIRECTORY_SEPARATOR . "general-header." . $ patternExtension ; $ generalFooterPath = $ partialPath . DIRECTORY_SEPARATOR . "general-footer." . $ patternExtension ; self :: $ htmlHead = ( file_exists ( $ generalHeaderPath ) ) ? file_get_contents ( $ generalHeaderPath ) : "" ; self :: $ htmlFoot = ( file_exists ( $ generalFooterPath ) ) ? file_get_contents ( $ generalFooterPath ) : "" ; // gather the user-defined header and footer information $ patternHeadPath = $ metaDir . DIRECTORY_SEPARATOR . "_00-head." . $ patternExtension ; $ patternFootPath = $ metaDir . DIRECTORY_SEPARATOR . "_01-foot." . $ patternExtension ; self :: $ patternHead = ( file_exists ( $ patternHeadPath ) ) ? file_get_contents ( $ patternHeadPath ) : "" ; self :: $ patternFoot = ( file_exists ( $ patternFootPath ) ) ? file_get_contents ( $ patternFootPath ) : "" ; // add the filesystemLoader $ patternEngineBasePath = PatternEngine :: getInstance ( ) -> getBasePath ( ) ; $ filesystemLoaderClass = $ patternEngineBasePath . "\Loaders\FilesystemLoader" ; $ options = array ( ) ; $ options [ "templatePath" ] = $ styleguideKitPath . DIRECTORY_SEPARATOR . "views" ; $ options [ "partialsPath" ] = $ options [ "templatePath" ] . DIRECTORY_SEPARATOR . "partials" ; self :: $ filesystemLoader = new $ filesystemLoaderClass ( $ options ) ; $ stringLoaderClass = $ patternEngineBasePath . "\Loaders\StringLoader" ; self :: $ stringLoader = new $ stringLoaderClass ( ) ; // i can't remember why i chose to implement the pattern loader directly in classes // i figure i had a good reason which is why it's not showing up here }
docstring: Set-up default vars
docstring_tokens: Set - up default vars