protected static function getStringRenderings($php)
	{
		$chunks = explode('$this->at($node);', $php);
		if (count($chunks) > 2)
		{
			// Can't use string replacements if there are more than one xsl:apply-templates
			return [];
		}

		$renderings = [];
		foreach ($chunks as $k => $chunk)
		{
			// Try a static replacement first
			$rendering = self::getStaticRendering($chunk);
			if ($rendering !== false)
			{
				$renderings[$k] = ['static', $rendering];
			}
			elseif ($k === 0)
			{
				// If this is the first chunk, we can try a dynamic replacement. This wouldn't work
				// for the second chunk because we wouldn't have access to the attribute values
				$rendering = self::getDynamicRendering($chunk);
				if ($rendering !== false)
				{
					$renderings[$k] = ['dynamic', $rendering];
				}
			}
		}

		return $renderings;
	}
protected static function getStringRenderings($php)
	{
		$chunks = explode('$this->at($node);', $php);
		if (count($chunks) > 2)
		{
			// Can't use string replacements if there are more than one xsl:apply-templates
			return [];
		}

		$renderings = [];
		foreach ($chunks as $k => $chunk)
		{
			// Try a static replacement first
			$rendering = self::getStaticRendering($chunk);
			if ($rendering !== false)
			{
				$renderings[$k] = ['static', $rendering];
			}
			elseif ($k === 0)
			{
				// If this is the first chunk, we can try a dynamic replacement. This wouldn't work
				// for the second chunk because we wouldn't have access to the attribute values
				$rendering = self::getDynamicRendering($chunk);
				if ($rendering !== false)
				{
					$renderings[$k] = ['dynamic', $rendering];
				}
			}
		}

		return $renderings;
	}
protected static function getStringRenderings ( $ php ) { $ chunks = explode ( '$this->at($node);' , $ php ) ; if ( count ( $ chunks ) > 2 ) { // Can't use string replacements if there are more than one xsl:apply-templates return [ ] ; } $ renderings = [ ] ; foreach ( $ chunks as $ k => $ chunk ) { // Try a static replacement first $ rendering = self :: getStaticRendering ( $ chunk ) ; if ( $ rendering !== false ) { $ renderings [ $ k ] = [ 'static' , $ rendering ] ; } elseif ( $ k === 0 ) { // If this is the first chunk, we can try a dynamic replacement. This wouldn't work // for the second chunk because we wouldn't have access to the attribute values $ rendering = self :: getDynamicRendering ( $ chunk ) ; if ( $ rendering !== false ) { $ renderings [ $ k ] = [ 'dynamic' , $ rendering ] ; } } } return $ renderings ; }
Get string rendering strategies for given chunks

@param  string $php
@return array
Get string rendering strategies for given chunks