@param array $metas

@return MetaAwareInterface
778223
public function setMetas(array $metas): MetaAwareInterface
    {
        $this->metas = $metas;

        //convert pluginAnnotation meta to correct key:value pair
        foreach ($this->metas as $index => $meta) {
            if ($meta instanceof PluginConfigAnnotation) {
                unset($this->metas[$index]);
                $this->setMeta($meta->getName(), $meta->getConfig());
            }
        }

        return $this;
    }
167357
public function setMeta(string $key, $value): MetaAwareInterface
    {
        //convert pluginAnnotation meta to correct key:value pair
        if ($value instanceof PluginConfigAnnotation) {
            $key = $value->getName();
            $value = $value->getConfig();
        }

        $this->metas[$key] = $value;

        return $this;
    }
394041
public static function setMetas(array $metas, bool $replace_existing=false) :void {
		// if we want to purge existing metas
		!$replace_existing ?: self::$_metas = [];
		// name is the key for storing metas
		self::$_metas += $metas;
	}
1062067
public function addMetaField(array $fields)
    {
        $fields = parent::addMetaField($fields);
        foreach ($fields as $key => &$field) {
            if ($field['type'] === 'fieldset') {
                $field['fields'][static::Meta] = $fields[static::Meta];
                unset($fields[static::Meta]);
                break;
            }
        }
        return $fields;
    }
568447
public function parse($class, array $meta = [])
    {
        $methods = get_class_methods($class);
        foreach($methods as $method) {
            $query = Annotation::ofMethod($class, $method, 'uri');
            if($query) {
                $this->add($query, [$class, $method], $meta);
            }
        }

        return $this;
    }
395174
public function call(ArrayAccess $services)
    {
        $callbackReflection = new CallableReflection($this->getController());
        return $callbackReflection->invokeA($this->prepareArgs($services, $callbackReflection));
    }
1200470
private function createMetasetConfig(array $metaSets)
    {
        $optionResolver = $this->get('phlexible_meta_set.option_resolver');

        $meta = array();

        foreach ($metaSets as $metaSet) {
            $fieldDatas = [];

            foreach ($metaSet->getFields() as $field) {
                $options = $optionResolver->resolve($field);

                $fieldData = [
                    'key' => $field->getName(),
                    'type' => $field->getType(),
                    'options' => $options,
                    'readonly' => $field->isReadonly(),
                    'required' => $field->isRequired(),
                    'synchronized' => $field->isSynchronized(),
                ];

                $fieldDatas[] = $fieldData;
            }

            $meta[] = [
                'set_id' => $metaSet->getId(),
                'title' => $metaSet->getName(),
                'fields' => $fieldDatas,
            ];
        }

        return $meta;
    }
422965
public static function SetTemplates ($templates = []) {
		if (gettype(static::$templates) == 'array') {
			static::$templates = (array) $templates;
		} else {
			static::$templates = (object) $templates;
		}
		return static::$templates;
	}
846180
public function addMetaField(array $fields)
    {
        $this->setMeta($this->constructFieldMeta($fields));
        $fields[static::Meta] = array(
            'type' => 'hidden',
            'value' => json_encode($this->getMeta()),
        );
        return $fields;
    }
1180012
public static function factory(array $middlewares = array())
    {
        $stack = new static;
        foreach ($middlewares as $middleware) {
            $stack = $stack->add($middleware);
        }
        return $stack;
    }
290378
public function createElement(array $attributes)
    {
        $meta = $this->ownerDocument->createElement('meta');

        $name = null;
        foreach ($attributes as $key => $value) {
            $meta->setAttribute($key, $value);
        }

        $this[] = $meta;

        return $meta;
    }
1345054
public function defaults(array $defaults = null)
    {
        if (null === $defaults)
        {
            return $this->_defaults;
        }
        $this->_defaults = $defaults;

        return $this;
    }
225414
public function create(array $paths)
    {
        $standards = new Standards();
        foreach ($paths as $path) {
            $standards->addStandard($this->standardFactory->create($path));
        }

        return $standards;
    }
394574
protected function parseMethodModifiers(array $tokens)
	{
		$modifiers = MetaInfo::IS_PUBLIC;
	
		foreach($tokens as $tok)
		{
			if(is_array($tok))
			{
				switch($tok[0])
				{
					case T_PUBLIC:
						$modifiers = ($modifiers | MetaInfo::MASK_VISIBILITY) ^ MetaInfo::IS_NOT_PUBLIC;
						break;
					case T_PRIVATE:
						$modifiers = ($modifiers | MetaInfo::MASK_VISIBILITY) ^ MetaInfo::IS_NOT_PRIVATE;
						break;
					case T_PROTECTED:
						$modifiers = ($modifiers | MetaInfo::MASK_VISIBILITY) ^ MetaInfo::IS_NOT_PROTECTED;
						break;
					case T_STATIC:
						$modifiers |= MetaInfo::IS_STATIC;
						break;
					case T_ABSTRACT:
						$modifiers |= MetaInfo::IS_ABSTRACT;
						break;
					case T_FINAL:
						$modifiers |= MetaInfo::IS_FINAL;
						break;
				}
			}
		}
	
		return $modifiers;
	}
388954
public function withMeta($meta): EncoderInterface
    {
        $this->meta    = $meta;
        $this->hasMeta = true;

        return $this;
    }
812458
public function setBindings(array $bindings)
    {
        foreach ($bindings as $key => $binding) {
            if (!$binding instanceof BoundArgument) {
                $bindings[$key] = new BoundArgument($binding);
            }
        }

        $this->bindings = $bindings;

        return $this;
    }
660454
public function setBindings(array $bindings)
    {
        foreach ($bindings as $key => $binding) {
            if (0 < strpos($key, '$') && $key !== $k = preg_replace('/[ \t]*\$/', ' $', $key)) {
                unset($bindings[$key]);
                $bindings[$key = $k] = $binding;
            }
            if (!$binding instanceof BoundArgument) {
                $bindings[$key] = new BoundArgument($binding);
            }
        }

        $this->bindings = $bindings;

        return $this;
    }