private function mcustom($directives)
	{
		$e = $this->__engine;

		foreach($directives as $directive) {
			$class = new $directive['class'];
			$reflection = new ReflectionMethod($class, 'message');
			$subject = $directive['class'];
			$object = $this;

			if ($class->name() !== false) {
				$name = $class->name();

				if ($e == 'blade') {
					$pattern = "/\@$name\((.*?)\)/";
				}
				else {
					$pattern = "/\{\% $name\((.*?)\) \%\}/";
				}
			}

			if ($class->directive() !== false) {
				$pattern = $class->directive();
			}

			if (!isset($pattern)) return;

			if (($class->directive() === false) && count($reflection->getParameters()) == 0) {
				if ($e == 'blade') {
					$pattern = "/\@$name/";
				}
				else {
					$pattern = "/\{\% $name \%\}/";
				}
			}

			if (count($reflection->getParameters()) > 0) {
				$this->__cached = preg_replace_callback($pattern, function($match) use($subject, $object, $class, $pattern) {
					return $object->persist($match, $subject, $class);
				}, $this->__cached);
			}
			else {
				$this->__cached = preg_replace_callback($pattern, function($match) use($subject, $object, $class, $pattern) {
					return $object->persist(null, $subject, $class, true);
				}, $this->__cached);
			}
		}
	}
private function mcustom($directives)
	{
		$e = $this->__engine;

		foreach($directives as $directive) {
			$class = new $directive['class'];
			$reflection = new ReflectionMethod($class, 'message');
			$subject = $directive['class'];
			$object = $this;

			if ($class->name() !== false) {
				$name = $class->name();

				if ($e == 'blade') {
					$pattern = "/\@$name\((.*?)\)/";
				}
				else {
					$pattern = "/\{\% $name\((.*?)\) \%\}/";
				}
			}

			if ($class->directive() !== false) {
				$pattern = $class->directive();
			}

			if (!isset($pattern)) return;

			if (($class->directive() === false) && count($reflection->getParameters()) == 0) {
				if ($e == 'blade') {
					$pattern = "/\@$name/";
				}
				else {
					$pattern = "/\{\% $name \%\}/";
				}
			}

			if (count($reflection->getParameters()) > 0) {
				$this->__cached = preg_replace_callback($pattern, function($match) use($subject, $object, $class, $pattern) {
					return $object->persist($match, $subject, $class);
				}, $this->__cached);
			}
			else {
				$this->__cached = preg_replace_callback($pattern, function($match) use($subject, $object, $class, $pattern) {
					return $object->persist(null, $subject, $class, true);
				}, $this->__cached);
			}
		}
	}
private function mcustom ( $ directives ) { $ e = $ this -> __engine ; foreach ( $ directives as $ directive ) { $ class = new $ directive [ 'class' ] ; $ reflection = new ReflectionMethod ( $ class , 'message' ) ; $ subject = $ directive [ 'class' ] ; $ object = $ this ; if ( $ class -> name ( ) !== false ) { $ name = $ class -> name ( ) ; if ( $ e == 'blade' ) { $ pattern = "/\@$name\((.*?)\)/" ; } else { $ pattern = "/\{\% $name\((.*?)\) \%\}/" ; } } if ( $ class -> directive ( ) !== false ) { $ pattern = $ class -> directive ( ) ; } if ( ! isset ( $ pattern ) ) return ; if ( ( $ class -> directive ( ) === false ) && count ( $ reflection -> getParameters ( ) ) == 0 ) { if ( $ e == 'blade' ) { $ pattern = "/\@$name/" ; } else { $ pattern = "/\{\% $name \%\}/" ; } } if ( count ( $ reflection -> getParameters ( ) ) > 0 ) { $ this -> __cached = preg_replace_callback ( $ pattern , function ( $ match ) use ( $ subject , $ object , $ class , $ pattern ) { return $ object -> persist ( $ match , $ subject , $ class ) ; } , $ this -> __cached ) ; } else { $ this -> __cached = preg_replace_callback ( $ pattern , function ( $ match ) use ( $ subject , $ object , $ class , $ pattern ) { return $ object -> persist ( null , $ subject , $ class , true ) ; } , $ this -> __cached ) ; } } }
Run custom directives

@param  array $directives
@return string $this->__cached
Run custom directives