CodeExplorer extractSource example
$template =
unserialize(sprintf('O:%d:"%s":0:{}', \
strlen($f['class'
]),
$f['class'
]));
} if (null !==
$template) { $ellipsis = 0;
$templateSrc =
method_exists($template, 'getSourceContext'
) ?
$template->
getSourceContext()->
getCode() :
(method_exists($template, 'getSource'
) ?
$template->
getSource() : ''
);
$templateInfo =
$template->
getDebugInfo();
if (isset($templateInfo[$f['line'
]])) { if (!
method_exists($template, 'getSourceContext'
) || !
is_file($templatePath =
$template->
getSourceContext()->
getPath())) { $templatePath = null;
} if ($templateSrc) { $src = self::
extractSource($templateSrc,
$templateInfo[$f['line'
]], self::
$srcContext, 'twig',
$templatePath,
$f);
$srcKey =
($templatePath ?:
$template->
getTemplateName()).':'.
$templateInfo[$f['line'
]];
} } } } if ($srcKey ==
$f['file'
]) { $src = self::
extractSource(file_get_contents($f['file'
]),
$f['line'
], self::
$srcContext, 'php',
$f['file'
],
$f);
$srcKey .= ':'.
$f['line'
];
if ($ellipsis) { $ellipsis += 1 + \
strlen($f['line'
]);
} } $template =
unserialize(sprintf('O:%d:"%s":0:{}', \
strlen($f['class'
]),
$f['class'
]));
} if (null !==
$template) { $ellipsis = 0;
$templateSrc =
method_exists($template, 'getSourceContext'
) ?
$template->
getSourceContext()->
getCode() :
(method_exists($template, 'getSource'
) ?
$template->
getSource() : ''
);
$templateInfo =
$template->
getDebugInfo();
if (isset($templateInfo[$f['line'
]])) { if (!
method_exists($template, 'getSourceContext'
) || !
is_file($templatePath =
$template->
getSourceContext()->
getPath())) { $templatePath = null;
} if ($templateSrc) { $src = self::
extractSource($templateSrc,
$templateInfo[$f['line'
]], self::
$srcContext, 'twig',
$templatePath,
$f);
$srcKey =
($templatePath ?:
$template->
getTemplateName()).':'.
$templateInfo[$f['line'
]];
} } } } if ($srcKey ==
$f['file'
]) { $src = self::
extractSource(file_get_contents($f['file'
]),
$f['line'
], self::
$srcContext, 'php',
$f['file'
],
$f);
$srcKey .= ':'.
$f['line'
];
if ($ellipsis) { $ellipsis += 1 + \
strlen($f['line'
]);
} }