@param Image\Exif $exif
@param array      $a
@param Stub       $stub
@param bool       $isNested
@param int        $filter

@return array|mixed
431408
public static function castImageExif(Image\Exif $exif, array $a, Stub $stub, $isNested, $filter = 0)
    {
        $a = $a[Caster::PREFIX_PROTECTED . 'data'];

        $a[Caster::PREFIX_VIRTUAL . 'aspectRatio'] = $exif->getAspectRatio();
        $a[Caster::PREFIX_VIRTUAL . 'latitude'] = $exif->getLatitude();
        $a[Caster::PREFIX_VIRTUAL . 'longitude'] = $exif->getLongitude();

        return $a;
    }
297546
protected function castResource(Stub $stub, $isNested)
    {
        $a = [];
        $res = $stub->value;
        $type = $stub->class;

        try {
            if (!empty($this->casters[':'.$type])) {
                foreach ($this->casters[':'.$type] as $callback) {
                    $a = $callback($res, $a, $stub, $isNested, $this->filter);
                }
            }
        } catch (\Exception $e) {
            $a = [(Stub::TYPE_OBJECT === $stub->type ? Caster::PREFIX_VIRTUAL : '').'⚠' => new ThrowingCasterException($e)] + $a;
        }

        return $a;
    }
6803
public static function getF($name, $filter = array(), $default = false)
	{
		if (isset($_COOKIE[$name]))
		{
			return execFilter($_COOKIE[$name], $filter);
		}
		else
		{
			return $default;
		}
	}
1277913
public function loadFilter($file, $is_global = false)
    {
        $defines = $this->yaml->load($file);

        // when global, load "*"
        $filters = isset($defines['*']) && $defines['*'] ? $defines['*'] : [];

        // when local, load "*" and "controller.action"
        $key = $this->controller->getFilterKey();
        $filters = array_merge($filters, isset($defines[$key]) && $defines[$key] ? (array)$defines[$key] : []);

        $key = $this->controller->getFilterKey($this->action);
        $filters = array_merge($filters, isset($defines[$key]) && $defines[$key] ? (array)$defines[$key] : []);

        foreach ($filters as $name => $attributes) {
            $this->addFilter($name, $attributes);
        }
    }
1235738
function exifBuffer(buf, options, cb) {
  if(typeof options === 'function') {
    cb = options;
    options = {};
  }

  try {
    buf = bufferUtils.toArrayBuffer(buf);

    if(hasWorker) {
      const wr = require('webworkify')(exifWorker);

      wr.onmessage = ({ data: msg }) => {
        const err = msg.err ? new Error(msg.err) : undefined;
        cb(err, msg.result);
      };

      const msg = {
        buf: buf
      };

      if (options.transferable) {
        wr.postMessage(msg, [ buf ]);
      } else {
        wr.postMessage(msg);
      }
    } else {
      exif(buf, options, cb);
    }
  } catch(err) {
    cb(err);
  }
}
766452
public static function toProtobuf($object, $filter = NULL)
	{
		$output = '';

		if (isset($object->name) && ($filter === null || isset($filter['name']))) {
			$output .= "\x0a";
			$output .= Binary::encodeVarint(strlen($object->name));
			$output .= $object->name;
		}

		if (isset($object->package) && ($filter === null || isset($filter['package']))) {
			$output .= "\x12";
			$output .= Binary::encodeVarint(strlen($object->package));
			$output .= $object->package;
		}

		if (isset($object->dependency) && ($filter === null || isset($filter['dependency']))) {
			foreach ($object->dependency instanceof \Traversable ? $object->dependency : (array)$object->dependency as $k => $v) {
				$output .= "\x1a";
				$output .= Binary::encodeVarint(strlen($v));
				$output .= $v;
			}
		}

		if (isset($object->publicDependency) && ($filter === null || isset($filter['publicDependency']))) {
			foreach ($object->publicDependency instanceof \Traversable ? $object->publicDependency : (array)$object->publicDependency as $k => $v) {
				$output .= "\x50";
				$output .= Binary::encodeVarint($v);
			}
		}

		if (isset($object->weakDependency) && ($filter === null || isset($filter['weakDependency']))) {
			foreach ($object->weakDependency instanceof \Traversable ? $object->weakDependency : (array)$object->weakDependency as $k => $v) {
				$output .= "\x58";
				$output .= Binary::encodeVarint($v);
			}
		}

		if (isset($object->messageType) && ($filter === null || isset($filter['messageType']))) {
			foreach ($object->messageType instanceof \Traversable ? $object->messageType : (array)$object->messageType as $k => $v) {
				$output .= "\x22";
				$buffer = DescriptorProtoMeta::toProtobuf($v, $filter === null ? null : $filter['messageType']);
				$output .= Binary::encodeVarint(strlen($buffer));
				$output .= $buffer;
			}
		}

		if (isset($object->enumType) && ($filter === null || isset($filter['enumType']))) {
			foreach ($object->enumType instanceof \Traversable ? $object->enumType : (array)$object->enumType as $k => $v) {
				$output .= "\x2a";
				$buffer = EnumDescriptorProtoMeta::toProtobuf($v, $filter === null ? null : $filter['enumType']);
				$output .= Binary::encodeVarint(strlen($buffer));
				$output .= $buffer;
			}
		}

		if (isset($object->service) && ($filter === null || isset($filter['service']))) {
			foreach ($object->service instanceof \Traversable ? $object->service : (array)$object->service as $k => $v) {
				$output .= "\x32";
				$buffer = ServiceDescriptorProtoMeta::toProtobuf($v, $filter === null ? null : $filter['service']);
				$output .= Binary::encodeVarint(strlen($buffer));
				$output .= $buffer;
			}
		}

		if (isset($object->extension) && ($filter === null || isset($filter['extension']))) {
			foreach ($object->extension instanceof \Traversable ? $object->extension : (array)$object->extension as $k => $v) {
				$output .= "\x3a";
				$buffer = FieldDescriptorProtoMeta::toProtobuf($v, $filter === null ? null : $filter['extension']);
				$output .= Binary::encodeVarint(strlen($buffer));
				$output .= $buffer;
			}
		}

		if (isset($object->options) && ($filter === null || isset($filter['options']))) {
			$output .= "\x42";
			$buffer = FileOptionsMeta::toProtobuf($object->options, $filter === null ? null : $filter['options']);
			$output .= Binary::encodeVarint(strlen($buffer));
			$output .= $buffer;
		}

		if (isset($object->sourceCodeInfo) && ($filter === null || isset($filter['sourceCodeInfo']))) {
			$output .= "\x4a";
			$buffer = SourceCodeInfoMeta::toProtobuf($object->sourceCodeInfo, $filter === null ? null : $filter['sourceCodeInfo']);
			$output .= Binary::encodeVarint(strlen($buffer));
			$output .= $buffer;
		}

		if (isset($object->syntax) && ($filter === null || isset($filter['syntax']))) {
			$output .= "\x62";
			$output .= Binary::encodeVarint(strlen($object->syntax));
			$output .= $object->syntax;
		}

		return $output;
	}
1260999
public static function toProtobuf($object, $filter = NULL)
	{
		$output = '';

		if (isset($object->name) && ($filter === null || isset($filter['name']))) {
			$output .= "\x0a";
			$output .= Binary::encodeVarint(strlen($object->name));
			$output .= $object->name;
		}

		if (isset($object->inputType) && ($filter === null || isset($filter['inputType']))) {
			$output .= "\x12";
			$output .= Binary::encodeVarint(strlen($object->inputType));
			$output .= $object->inputType;
		}

		if (isset($object->outputType) && ($filter === null || isset($filter['outputType']))) {
			$output .= "\x1a";
			$output .= Binary::encodeVarint(strlen($object->outputType));
			$output .= $object->outputType;
		}

		if (isset($object->options) && ($filter === null || isset($filter['options']))) {
			$output .= "\x22";
			$buffer = MethodOptionsMeta::toProtobuf($object->options, $filter === null ? null : $filter['options']);
			$output .= Binary::encodeVarint(strlen($buffer));
			$output .= $buffer;
		}

		if (isset($object->clientStreaming) && ($filter === null || isset($filter['clientStreaming']))) {
			$output .= "\x28";
			$output .= Binary::encodeVarint((int)$object->clientStreaming);
		}

		if (isset($object->serverStreaming) && ($filter === null || isset($filter['serverStreaming']))) {
			$output .= "\x30";
			$output .= Binary::encodeVarint((int)$object->serverStreaming);
		}

		return $output;
	}
438089
public function list($filter = [], $num = 30, $offset = 0, $cols = null) {
		$query = $this->newSelect();
		if (is_array($cols)) {
			$query->addColumns(...$cols);
		}
		foreach ($filter as $k => $v) {
			$query->andWhere(field($k)->eq($v));
		}
		$query->offset($offset)->limit($num);
		return $this->execute($query);
	}
1354534
protected function extract(Array $values, $filter = array(), $isDirty = true)
    {
        $product = &$values['product'];
        if (isset($product) && $product instanceof Product) {
            $filter[] = 'product';            
            $values = array_merge($values, array(
                'description' => $product->description,
                'ledgerAccountId' => $product->ledgerAccountId,
                'price' => $product->price,
                'taxRateId' => $product->taxRateId,
            ));
        }
        return parent::extract($values, $filter, $isDirty);
    }
442203
function exifBuffer(buf, options, cb) {
  if (typeof options === 'function') {
    cb = options;
    options = {};
  }

  try {
    buf = bufferUtils.toArrayBuffer(buf);

    if (_hasWorker.hasWorker) {
      const wr = require('webworkify')(_exifWorker2.default);

      wr.onmessage = ({ data: msg }) => {
        const err = msg.err ? new Error(msg.err) : undefined;
        cb(err, msg.result);
      };

      const msg = {
        buf: buf
      };

      if (options.transferable) {
        wr.postMessage(msg, [buf]);
      } else {
        wr.postMessage(msg);
      }
    } else {
      (0, _exif2.default)(buf, options, cb);
    }
  } catch (err) {
    cb(err);
  }
}
1100359
public function filter($path, $filter, array $runtimeConfig = array())
    {
        if ($path instanceof ImageInterface) {
            $path = $path->getPath();
        }

        if (empty($path)) {
            return $this->imageHolderPath.'/'.$this->getFilterDimension($filter);
        }

        return new \Twig_Markup(
            $this->cacheManager->getBrowserPath($path, $filter, $runtimeConfig),
            'utf8'
        );
    }
743716
public static function castFile(FileInterface $file, array $a, Stub $stub, $isNested, $filter = 0)
    {
        if ($file->exists()) {
            $a[Caster::PREFIX_PROTECTED . 'mimetype'] = $file->getMimeType();
            $a[Caster::PREFIX_PROTECTED . 'size'] = $file->getSize();
            $a[Caster::PREFIX_VIRTUAL . 'sizeFormatted'] = $file->getSizeFormatted();
        } else {
            unset($a[Caster::PREFIX_PROTECTED . 'mimetype']);
            unset($a[Caster::PREFIX_PROTECTED . 'size']);
        }

        return $a;
    }
128973
protected function castObject(Stub $stub, $isNested)
    {
        $obj = $stub->value;
        $class = $stub->class;

        if (isset($class[15]) && "\0" === $class[15] && 0 === strpos($class, "class@anonymous\x00")) {
            $stub->class = get_parent_class($class).'@anonymous';
        }
        if (isset($this->classInfo[$class])) {
            list($i, $parents, $hasDebugInfo, $fileInfo) = $this->classInfo[$class];
        } else {
            $i = 2;
            $parents = [$class];
            $hasDebugInfo = method_exists($class, '__debugInfo');

            foreach (class_parents($class) as $p) {
                $parents[] = $p;
                ++$i;
            }
            foreach (class_implements($class) as $p) {
                $parents[] = $p;
                ++$i;
            }
            $parents[] = '*';

            $r = new \ReflectionClass($class);
            $fileInfo = $r->isInternal() || $r->isSubclassOf(Stub::class) ? [] : [
                'file' => $r->getFileName(),
                'line' => $r->getStartLine(),
            ];

            $this->classInfo[$class] = [$i, $parents, $hasDebugInfo, $fileInfo];
        }

        $stub->attr += $fileInfo;
        $a = Caster::castObject($obj, $class, $hasDebugInfo);

        try {
            while ($i--) {
                if (!empty($this->casters[$p = $parents[$i]])) {
                    foreach ($this->casters[$p] as $callback) {
                        $a = $callback($obj, $a, $stub, $isNested, $this->filter);
                    }
                }
            }
        } catch (\Exception $e) {
            $a = [(Stub::TYPE_OBJECT === $stub->type ? Caster::PREFIX_VIRTUAL : '').'⚠' => new ThrowingCasterException($e)] + $a;
        }

        return $a;
    }
653522
function load(ImageInterface $image, array $options = [])
    {
        list($width, $height) = $options['size'];

        $filter = new SmartResize(new Box($width, $height));
        $image = $filter->apply($image);

        return $image;
    }
710467
protected function filterCanBeApplied($filter, $value)
    {
        $filterExists = method_exists($this, $filter);
        $hasValue = $value !== '' && $value !== null;
        $valueIsLegit = $hasValue || in_array($filter, $this->implicitFilters);

        return $filterExists && $valueIsLegit;
    }
425292
public function filter($filter): ArrayObjectInterface
    {
        return \is_callable($filter, true) ? $this->filterCallback($filter) : $this->filterConditions($filter);
    }
503649
function exif (file) {
    "use strict";    
    var deferred = Q.defer(), o = {};
    
    new ExifImage({ image : file }, function (error, data) {
      if (error) 
         {
         // callback.call("error " + file);
         deferred.reject("ERROR");     
         }
      if (data)
        {
        o.file = file;
        o.data = data;    
        deferred.resolve(o); 
        }
    });
    
    return deferred.promise;
    }