exitContext() public static method

Decrements the context lock counter and destroy the context when it reaches to 0
public static exitContext ( )
Ejemplo n.º 1
0
 public function serialize()
 {
     SerializableClosure::enterContext();
     $object = $this->mapFunction1($this->variables);
     SerializableClosure::exitContext();
     return serialize($object);
 }
Ejemplo n.º 2
0
 /**
  * Serialize
  * @return  string
  */
 public function serialize()
 {
     SerializableClosure::enterContext();
     $object = serialize(array('dirty' => $this->dirty, 'parent' => parent::serialize()));
     SerializableClosure::exitContext();
     return $object;
 }
Ejemplo n.º 3
0
 /**
  * String representation of object
  * @link http://php.net/manual/en/serializable.serialize.php
  * @return string the string representation of the object or null
  * @since 5.1.0
  */
 public function serialize()
 {
     SerializableClosure::enterContext();
     $object = serialize(array_map(function ($value) {
         return $value instanceof Closure ? SerializableClosure::from($value) : $value;
     }, $this->factories));
     SerializableClosure::exitContext();
     return $object;
 }
Ejemplo n.º 4
0
 /**
  * @return string
  */
 public function serialize()
 {
     $map = function ($value) {
         return $value instanceof Closure ? SerializableClosure::from($value) : $value;
     };
     SerializableClosure::enterContext();
     $object = serialize(array('callback' => $map($this->callback), 'setters' => array_map($map, $this->setters)));
     SerializableClosure::exitContext();
     return $object;
 }
Ejemplo n.º 5
0
 /**
  * @return string
  */
 public function serialize()
 {
     SerializableClosure::enterContext();
     $callable = $this->callback;
     if ($callable instanceof Closure) {
         $callable = SerializableClosure::from($callable);
     }
     $object = serialize($callable);
     SerializableClosure::exitContext();
     return $object;
 }
Ejemplo n.º 6
0
 public function serialize()
 {
     SerializableClosure::enterContext();
     $object = serialize(array_map(function ($value) {
         if ($value instanceof Closure) {
             return SerializableClosure::from($value);
         }
         return $value;
     }, $this->callbacks));
     SerializableClosure::exitContext();
     return $object;
 }
Ejemplo n.º 7
0
 /**
  * @return string
  */
 public function serialize()
 {
     SerializableClosure::enterContext();
     $map = function ($value) {
         if ($value instanceof \Closure) {
             return SerializableClosure::from($value);
         }
         return $value;
     };
     $object = serialize(['builder' => $map($this->builder), 'storage' => array_map($map, $this->storage)]);
     SerializableClosure::exitContext();
     return $object;
 }
Ejemplo n.º 8
0
 public function serialize()
 {
     SerializableClosure::enterContext();
     $object = serialize(array('builder' => SerializableClosure::from($this->builder), 'defaultStorage' => $this->defaultStorage, 'storages' => array_map(function ($value) {
         return SerializableClosure::from($value);
     }, $this->storages)));
     SerializableClosure::exitContext();
     return $object;
 }
Ejemplo n.º 9
0
 public function serialize()
 {
     SerializableClosure::enterContext();
     $object = serialize(array('subtest' => $this->subtest, 'func' => SerializableClosure::from($this->func)));
     SerializableClosure::exitContext();
     return $object;
 }
Ejemplo n.º 10
0
 /**
  * Serialize
  *
  * @return  string
  */
 public function serialize()
 {
     SerializableClosure::enterContext();
     $object = serialize(array('handler' => $this->handler instanceof \Closure ? SerializableClosure::from($this->handler) : $this->handler, 'factory' => $this->factory instanceof \Closure ? SerializableClosure::from($this->factory) : $this->factory));
     SerializableClosure::exitContext();
     return $object;
 }
Ejemplo n.º 11
0
 /**
  * Serialize
  * 
  * @return  string
  */
 public function serialize()
 {
     SerializableClosure::enterContext();
     $map = [static::class, 'wrapClosures'];
     $object = serialize(['parent' => parent::serialize(), 'wildcards' => $this->wildcards, 'filters' => $this->filters, 'bindings' => array_map($map, $this->bindings), 'defaults' => array_map($map, $this->defaults), 'errors' => array_map($map, $this->errors)]);
     SerializableClosure::exitContext();
     return $object;
 }
Ejemplo n.º 12
0
 /**
  * Serialize the route
  * 
  * @return  string
  */
 public function serialize()
 {
     SerializableClosure::enterContext();
     $routeAction = $this->routeAction;
     if ($routeAction instanceof Closure) {
         $routeAction = SerializableClosure::from($routeAction);
     }
     $map = array(static::class, 'wrapClosures');
     $object = serialize(array('routePattern' => $this->routePattern, 'routeAction' => $routeAction, 'routeName' => $this->routeName, 'routeID' => $this->routeID, 'wildcards' => $this->wildcards, 'bindings' => array_map($map, $this->bindings), 'defaults' => array_map($map, $this->defaults), 'properties' => array_map($map, $this->properties), 'collection' => $this->collection));
     SerializableClosure::exitContext();
     return $object;
 }
Ejemplo n.º 13
0
 /**
  * @return string
  */
 public function serialize()
 {
     SerializableClosure::enterContext();
     $object = serialize(array('bindings' => $this->bindings, 'aliases' => $this->aliases));
     SerializableClosure::exitContext();
     return $object;
 }
Ejemplo n.º 14
0
 /**
  * @return string
  */
 public function serialize()
 {
     SerializableClosure::enterContext();
     $callback = function ($value) {
         return $value instanceof Closure ? SerializableClosure::from($value) : $value;
     };
     $object = serialize(array('concrete' => $callback($this->concrete), 'shared' => $this->shared, 'setters' => array_map($callback, $this->setters), 'extenders' => $this->extenders));
     SerializableClosure::exitContext();
     return $object;
 }
Ejemplo n.º 15
0
 /**
  * Serialize
  * 
  * @return  string
  */
 public function serialize()
 {
     SerializableClosure::enterContext();
     $object = serialize(array('resolver' => $this->resolver, 'collection' => $this->collection));
     SerializableClosure::exitContext();
     return $object;
 }