return sprintf('\\%X ', $ord);
}
/**
* Converts a string to UTF-8 from the base encoding. The base encoding is set via this
*
* @param string $string
* @throws Exception\RuntimeException
* @return string
*/
protected function toUtf8($string)
{
if ($this->getEncoding() === 'utf-8') {
$result = $string;
} else {
$result = $this->convertEncoding($string, 'UTF-8', $this->getEncoding());
}
if (! $this->isUtf8($result)) {
throw new Exception\RuntimeException(
sprintf('String to be escaped was not valid UTF-8 or could not be converted: %s', $result)
);
}
return $result;
}
/**
* Converts a string from UTF-8 to the base encoding. The base encoding is set via this
*
* @param string $string
* @return string
*/
protected function fromUtf8($string)
{
if ($this->getEncoding() === 'utf-8') {
return $string;
}
return $this->convertEncoding($string, $this->getEncoding(), 'UTF-8');
Arguments
b"String to be escaped was not valid UTF-8 or could not be converted: Wß┤ç╩ƒ╩ƒ ß┤ø╩£╔¬s ╔¬s ß┤èß┤£sß┤ø ß┤Ç ß┤ø╩Åß┤ÿ╔¬ß┤äß┤Ç╩ƒ ß┤ÿ╔¬ß┤äß┤øß┤£╩Çß┤ç ß┤ÅÊô ß┤Ç ß┤íß┤Çß┤øß┤ç╩Ç ß┤à╩Çß┤Ç╔óß┤Å╔┤ ß┤ìß┤çß┤Ç╔┤╔¬╔┤╔ó ß┤Ç ß┤à╩Çß┤Ç╔óß"
* Escape a string for the HTML Body context where there are very few characters
* of special meaning. Internally this will use htmlspecialchars().
*
* @return string
*/
public function escapeHtml(string $string)
{
return htmlspecialchars($string, $this->htmlSpecialCharsFlags, $this->encoding);
}
/**
* Escape a string for the HTML Attribute context. We use an extended set of characters
* to escape that are not covered by htmlspecialchars() to cover cases where an attribute
* might be unquoted or quoted illegally (e.g. backticks are valid quotes for IE).
*
* @return string
*/
public function escapeHtmlAttr(string $string)
{
$string = $this->toUtf8($string);
if ($string === '' || ctype_digit($string)) {
return $string;
}
$result = preg_replace_callback('/[^a-z0-9,\.\-_]/iSu', $this->htmlAttrMatcher, $string);
return $this->fromUtf8($result);
}
/**
* Escape a string for the Javascript context. This does not use json_encode(). An extended
* set of characters are escaped beyond ECMAScript's rules for Javascript literal string
* escaping in order to prevent misinterpretation of Javascript as HTML leading to the
* injection of special characters and entities. The escaping used should be tolerant
* of cases where HTML escaping was not applied on top of Javascript escaping correctly.
* Backslash escaping is not used as it still leaves the escaped character as-is and so
* is not useful in a HTML context.
*
* @return string
*/
public function escapeJs(string $string)
Arguments
b"Wß┤ç╩ƒ╩ƒ ß┤ø╩£╔¬s ╔¬s ß┤èß┤£sß┤ø ß┤Ç ß┤ø╩Åß┤ÿ╔¬ß┤äß┤Ç╩ƒ ß┤ÿ╔¬ß┤äß┤øß┤£╩Çß┤ç ß┤ÅÊô ß┤Ç ß┤íß┤Çß┤øß┤ç╩Ç ß┤à╩Çß┤Ç╔óß┤Å╔┤ ß┤ìß┤çß┤Ç╔┤╔¬╔┤╔ó ß┤Ç ß┤à╩Çß┤Ç╔óß"
/**
* Escape a string
*
* @param string $string
* @return string
*/
protected function escape($string)
{
return $this->getEscaper()->escapeHtml((string) $string);
}
/**
* Escape an attribute value
*
* @param string $string
* @return string
*/
protected function escapeAttribute($string)
{
return $this->getEscaper()->escapeHtmlAttr((string) $string);
}
/**
* Set whether or not auto escaping should be used
*
* @param bool $autoEscape whether or not to auto escape output
* @return $this
*/
public function setAutoEscape($autoEscape = true)
{
$this->autoEscape = (bool) $autoEscape;
return $this;
}
/**
* Return whether autoEscaping is enabled or disabled
*
* @return bool
*/
public function getAutoEscape()
Arguments
b"Wß┤ç╩ƒ╩ƒ ß┤ø╩£╔¬s ╔¬s ß┤èß┤£sß┤ø ß┤Ç ß┤ø╩Åß┤ÿ╔¬ß┤äß┤Ç╩ƒ ß┤ÿ╔¬ß┤äß┤øß┤£╩Çß┤ç ß┤ÅÊô ß┤Ç ß┤íß┤Çß┤øß┤ç╩Ç ß┤à╩Çß┤Ç╔óß┤Å╔┤ ß┤ìß┤çß┤Ç╔┤╔¬╔┤╔ó ß┤Ç ß┤à╩Çß┤Ç╔óß"
$this->view->plugin('doctype')->isHtml5()
&& $type === 'charset'
) {
$tpl = $this->view->plugin('doctype')->isXhtml()
? '<meta %s="%s"/>'
: '<meta %s="%s">';
} elseif ($this->view->plugin('doctype')->isXhtml()) {
$tpl = '<meta %s="%s" content="%s"%s />';
} else {
$tpl = '<meta %s="%s" content="%s"%s>';
}
} else {
$tpl = '<meta %s="%s" content="%s"%s />';
}
$meta = sprintf(
$tpl,
$type,
$this->autoEscape ? $this->escapeAttribute($item->$type) : $item->$type,
$this->autoEscape ? $this->escapeAttribute($item->content) : $item->content,
$modifiersString
);
if (
isset($item->modifiers['conditional'])
&& ! empty($item->modifiers['conditional'])
&& is_string($item->modifiers['conditional'])
) {
// inner wrap with comment end and start if !IE
if (str_replace(' ', '', $item->modifiers['conditional']) === '!IE') {
$meta = '<!-->' . $meta . '<!--';
}
$meta = '<!--[if ' . $this->escape($item->modifiers['conditional']) . ']>' . $meta . '<![endif]-->';
}
return $meta;
}
/**
* Normalize type attribute of meta
Arguments
b"Wß┤ç╩ƒ╩ƒ ß┤ø╩£╔¬s ╔¬s ß┤èß┤£sß┤ø ß┤Ç ß┤ø╩Åß┤ÿ╔¬ß┤äß┤Ç╩ƒ ß┤ÿ╔¬ß┤äß┤øß┤£╩Çß┤ç ß┤ÅÊô ß┤Ç ß┤íß┤Çß┤øß┤ç╩Ç ß┤à╩Çß┤Ç╔óß┤Å╔┤ ß┤ìß┤çß┤Ç╔┤╔¬╔┤╔ó ß┤Ç ß┤à╩Çß┤Ç╔óß"
* @param string|int $indent
* @return string
*/
public function toString($indent = null)
{
$container = $this->getContainer();
$indent = null !== $indent
? $container->getWhitespace($indent)
: $container->getIndent();
$items = [];
$container->ksort();
$doctype = $this->view->plugin('doctype');
assert($doctype instanceof Doctype);
$isHtml5 = $doctype->isHtml5();
try {
foreach ($container as $item) {
$content = $this->itemToString($item);
if ($isHtml5 && $item->type === 'charset') {
array_unshift($items, $content);
continue;
}
$items[] = $content;
}
} catch (Exception\InvalidArgumentException $e) {
trigger_error($e->getMessage(), E_USER_WARNING);
return '';
}
return $indent . implode($this->escape($container->getSeparator()) . $indent, $items);
}
/**
* Create data item for inserting into stack
*
* @internal This method will become private in version 3.0
Arguments
*
* @param TKey $key
* @return void
*/
public function __unset($key)
{
$container = $this->getContainer();
if (isset($container[$key])) {
unset($container[$key]);
}
}
/**
* Cast to string representation
*
* @return string
*/
public function __toString()
{
return $this->toString();
}
/**
* String representation
*
* @return string
*/
public function toString()
{
return $this->getContainer()->toString();
}
/**
* Escape a string
*
* @param string $string
* @return string
*/
protected function escape($string)
{
<?php else:
$canonicalLink=$this->getLayoutVars('display_canonical_link');
if(strlen($canonicalLink)>0):
echo '<link href="'. $canonicalLink . '" rel="canonical" />';
endif;
endif;
?>
<?php echo $this->headTitle($this->translate($this->smService('Application\Config\SiteSetupBasic')->getSiteNameTitle('DragoArt')))->setSeparator(' - ')->setAutoEscape(true) ?>
<?php echo $this->headMeta()
->appendName('viewport', 'width=device-width, initial-scale=1.0')
->appendHttpEquiv('X-UA-Compatible', 'IE=edge')
?>
<!-- Le styles -->
<?php echo $this->headLink(array('rel' => 'shortcut icon', 'type' => 'image/vnd.microsoft.icon', 'href' => $resources->site['domain'] . 'images/' . $resources->img['file']['fav.ico']))?>
<?php //BOOTSTRAP SWITCH - TOGGLE BUTTON; ?>
<?php /*
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-switch/3.3.2/css/bootstrap3/bootstrap-switch.min.css" />
*/
?>
<?php /*
<script type="text/javascript" src="https://cdn.jsdelivr.net/clappr/latest/clappr.min.js"></script>
*/ ?>
<?php /*
<script type="text/javascript" src="https://cdn.jsdelivr.net/clappr/latest/clappr.min.js"></script>
if (array_key_exists('this', $__vars)) {
unset($__vars['this']);
}
extract($__vars);
unset($__vars); // remove $__vars from local scope
// @codingStandardsIgnoreEnd
$this->__content = '';
while ($this->__template = array_pop($this->__templates)) {
$this->__file = $this->resolver($this->__template);
if (! $this->__file) {
throw new Exception\RuntimeException(sprintf(
'%s: Unable to render template "%s"; resolver could not resolve to a file',
__METHOD__,
$this->__template
));
}
try {
ob_start();
$includeReturn = include $this->__file;
$this->__content = ob_get_clean();
} catch (Throwable $ex) {
ob_end_clean();
throw $ex;
}
if ($includeReturn === false && empty($this->__content)) {
throw new Exception\UnexpectedValueException(sprintf(
'%s: Unable to render template "%s"; file include failed',
__METHOD__,
$this->__file
));
}
}
$this->setVars(array_pop($this->__varsCache));
if ($this->__filterChain instanceof FilterChain) {
return $this->__filterChain->filter($this->__content); // filter output
}
Arguments
"/sites/dragoart/public_html/config/drawingtutorials/sites/dragoart_com/view/layout/layout.phtml"
// If EVENT_RENDERER or EVENT_RENDERER_POST changed the model, make sure
// we use this new model instead of the current $model
$model = $event->getModel();
// If we have children, render them first, but only if:
// a) the renderer does not implement TreeRendererInterface, or
// b) it does, but canRenderTrees() returns false
if (
$model->hasChildren()
&& (! $renderer instanceof TreeRendererInterface
|| ! $renderer->canRenderTrees())
) {
$this->renderChildren($model);
}
// Reset the model, in case it has changed, and set the renderer
$event->setModel($model);
$event->setRenderer($renderer);
$rendered = $renderer->render($model);
// If this is a child model, return the rendered content; do not
// invoke the response strategy.
$options = $model->getOptions();
if (array_key_exists('has_parent', $options) && $options['has_parent']) {
return $rendered;
}
$event->setResult($rendered);
$event->setName(ViewEvent::EVENT_RESPONSE);
$events->triggerEvent($event);
}
/**
* Loop through children, rendering each
*
* @throws Exception\DomainException
* @return void
*/
Arguments
if ($result instanceof Response) {
return $result;
}
// Martial arguments
$request = $e->getRequest();
$response = $e->getResponse();
$viewModel = $e->getViewModel();
if (! $viewModel instanceof ViewModel) {
return;
}
$view = $this->view;
$view->setRequest($request);
$view->setResponse($response);
$caughtException = null;
try {
$view->render($viewModel);
} catch (Throwable $ex) {
$caughtException = $ex;
} catch (Exception $ex) { // @TODO clean up once PHP 7 requirement is enforced
$caughtException = $ex;
}
if ($caughtException !== null) {
if ($e->getName() === MvcEvent::EVENT_RENDER_ERROR) {
throw $caughtException;
}
$application = $e->getApplication();
$events = $application->getEventManager();
$e->setError(Application::ERROR_EXCEPTION);
$e->setParam('exception', $caughtException);
$e->setName(MvcEvent::EVENT_RENDER_ERROR);
$events->triggerEvent($e);
}
Arguments
Laminas\View\Model\ViewModel {#636}
}
if ($this->sharedManager) {
foreach ($this->sharedManager->getListeners($this->identifiers, $name) as $priority => $listeners) {
$listOfListenersByPriority[$priority][] = $listeners;
}
}
// Sort by priority in reverse order
krsort($listOfListenersByPriority);
// Initial value of stop propagation flag should be false
$event->stopPropagation(false);
// Execute listeners
$responses = new ResponseCollection();
foreach ($listOfListenersByPriority as $listOfListeners) {
foreach ($listOfListeners as $listeners) {
foreach ($listeners as $listener) {
$response = $listener($event);
$responses->push($response);
// If the event was asked to stop propagating, do so
if ($event->propagationIsStopped()) {
$responses->setStopped(true);
return $responses;
}
// If the result causes our validation callback to return true,
// stop propagation
if ($callback && $callback($response)) {
$responses->setStopped(true);
return $responses;
}
}
}
}
return $responses;
}
Arguments
Laminas\Mvc\MvcEvent {#430}
$event = clone $this->eventPrototype;
$event->setName($eventName);
if ($target !== null) {
$event->setTarget($target);
}
if ($argv) {
$event->setParams($argv);
}
return $this->triggerListeners($event, $callback);
}
/**
* @inheritDoc
*/
public function triggerEvent(EventInterface $event)
{
return $this->triggerListeners($event);
}
/**
* @inheritDoc
*/
public function triggerEventUntil(callable $callback, EventInterface $event)
{
return $this->triggerListeners($event, $callback);
}
/**
* @inheritDoc
*/
public function attach($eventName, callable $listener, $priority = 1)
{
if (! is_string($eventName)) {
throw new Exception\InvalidArgumentException(sprintf(
'%s expects a string for the event; received %s',
__METHOD__,
is_object($eventName) ? $eventName::class : gettype($eventName)
Arguments
Laminas\Mvc\MvcEvent {#430}
return $this->completeRequest($event);
}
/**
* Complete the request
*
* Triggers "render" and "finish" events, and returns response from
* event object.
*
* @param MvcEvent $event
* @return Application
*/
protected function completeRequest(MvcEvent $event)
{
$events = $this->events;
$event->setTarget($this);
$event->setName(MvcEvent::EVENT_RENDER);
$event->stopPropagation(false); // Clear before triggering
$events->triggerEvent($event);
$event->setName(MvcEvent::EVENT_FINISH);
$event->stopPropagation(false); // Clear before triggering
$events->triggerEvent($event);
return $this;
}
}
Arguments
Laminas\Mvc\MvcEvent {#430}
// Trigger dispatch event
$event->setName(MvcEvent::EVENT_DISPATCH);
$event->stopPropagation(false); // Clear before triggering
$result = $events->triggerEventUntil($shortCircuit, $event);
// Complete response
$response = $result->last();
if ($response instanceof ResponseInterface) {
$event->setName(MvcEvent::EVENT_FINISH);
$event->setTarget($this);
$event->setResponse($response);
$event->stopPropagation(false); // Clear before triggering
$events->triggerEvent($event);
$this->response = $response;
return $this;
}
$response = $this->response;
$event->setResponse($response);
return $this->completeRequest($event);
}
/**
* Complete the request
*
* Triggers "render" and "finish" events, and returns response from
* event object.
*
* @param MvcEvent $event
* @return Application
*/
protected function completeRequest(MvcEvent $event)
{
$events = $this->events;
$event->setTarget($this);
$event->setName(MvcEvent::EVENT_RENDER);
$event->stopPropagation(false); // Clear before triggering
$events->triggerEvent($event);
Arguments
Laminas\Mvc\MvcEvent {#430}
} catch(Exception $e) {
//var_dump(debug_backtrace());
$gtgggg=[];
$gtgggg['err']=$e->getMessage();
$gtgggg['line']=$e->getLine();
$gtgggg['file']=$e->getFile();
$gtgggg['trace']=$e->getTrace();
$gtgggg['code']=$e->getCode();
d($gtgggg);
}
else:
Application::init(require 'config/' . PROJECT_ID_STRING . '/application.config.php')->run();
endif;