original_string: public static function render($source, $rules = array(), $directory = null) {
          if (!$directory)
              $directory = getcwd();
          
          return self::fromSpecification(
              fphp\Specification\TemplateSpecification::fromArrayAndSettings(
                  array(
                      "source" => $source,
                      "rules" => $rules
                  ), fphp\Settings::inDirectory($directory))
          )->getContent()->getSummary();
      }
code: public static function render($source, $rules = array(), $directory = null) {
          if (!$directory)
              $directory = getcwd();
          
          return self::fromSpecification(
              fphp\Specification\TemplateSpecification::fromArrayAndSettings(
                  array(
                      "source" => $source,
                      "rules" => $rules
                  ), fphp\Settings::inDirectory($directory))
          )->getContent()->getSummary();
      }
code_tokens: public static function render ( $ source , $ rules = array ( ) , $ directory = null ) { if ( ! $ directory ) $ directory = getcwd ( ) ; return self :: fromSpecification ( fphp \ Specification \ TemplateSpecification :: fromArrayAndSettings ( array ( "source" => $ source , "rules" => $ rules ) , fphp \ Settings :: inDirectory ( $ directory ) ) ) -> getContent ( ) -> getSummary ( ) ; }
docstring: A quick way to directly render a template file with some replacement rules.
  @param string $source
  @param array[] $rules
  @param string $directory
  @return string
docstring_tokens: A quick way to directly render a template file with some replacement rules .