中间件绑定Aware方法

@param array $awares ...
@return void
163237
public function attach(...$awares): void {
        foreach ($awares as $aware) {
            if (is_object($aware)) {
                $aware->addMiddlewares($this);
            } else {
                $aware::addStaticMiddlewares($this);
            }
        }
    }
182760
public function registerParsers(array $parsers)
	{
		foreach ($parsers as $extension => $parser)
		{
			$this->registerParser($extension, $parser);
		}
	}
1020802
public function setHeaders($headers) 
    {

       if(!$this->_parserObj) {
           $this->initParser($this->getRespondType());

        }

        /** @var array  _headers */
        $this->_headers = $this->getParser()->getHeaders();
        $this->_headers = array_merge($this->_headers,$headers);
    }
649552
public function setCustomHeaders(array $headers)
    {
        foreach ($headers as $k => &$v) {
            if (strpos($v, ':') === false) {
                $v = $k.': '.$v;
            }
        }
        $this->headers = $headers;
    }
815566
protected function removeHashes(array $hashes): void
    {
        $queryBuilder = $this->entityManager->createQueryBuilder();
        $queryBuilder->delete(IconFile::class, 'if')
                     ->andWhere('if.hash IN (:hashes)')
                     ->setParameter('hashes', array_values($hashes));

        $queryBuilder->getQuery()->execute();
    }
178816
public function add($infos)
    {
        array_push($this->infos, $infos);
        
        if (!isset($this->infos['fields'])) {
            $this->infos['fields'] = ["*"];
        }

        if (isset($infos['join'])) {
            array_push($this->joins, $infos['join']);
        }
        
        $this->mergeSqlInformation();
    }
878431
public function setSubclasses(array $subclasses)
    {
        foreach ($subclasses as $subclass) {
            $this->subClasses[] = $this->fullyQualifiedClassName($subclass);
        }
    }
475305
public function setTables(array $tables)
    {
        $this->tables = array();

        foreach ($tables as $table) {
            $this->addTable($table);
        }
    }
922775
private function executeStarts(array $indexes): void
    {
        BlockInterpreter::executeStarts(
            $indexes,
            $this->getBlocks(),
            $this->getContext(),
            $this->getErrorAggregator()
        );
    }
1254920
public function setHeaders(array $headers)
    {
        $this->headerRemove();
        
        foreach ($headers as $name => $values) {
            foreach ((array)$values as $value) {
                $this->header("$name: $value", false);
            }
        }
    }
223308
public function removeAll(array $entities): void
    {
        if ([] === $entities) {
            return;
        }
        foreach ($entities as $entity) {
            $this->checkIsCorrectEntityType($entity);
            $this->entityManager->remove($entity);
        }

        $this->entityManager->flush();
    }
24118
public function trackDefinedPrefixes( $prefixes )  {
		if ( !is_array( $prefixes ) ) {
			$prefixes = $this->matchPrefixes( $prefixes );
		}

		$this->definedPrefixes = array_merge( $this->definedPrefixes, $prefixes );
	}
471883
public function update(array $items = [])
    {
        foreach ($items as $key => $item) {
            $this->set($key, $item);
        }
    }
1109960
protected function clearDeferredByPrefixes(array $prefixes): void
    {
        $deferred = AdapterUtil::getPropertyValue($this, 'deferred');

        foreach ($prefixes as $prefix) {
            foreach ($deferred as $key => $value) {
                if ('' === $prefix || 0 === strpos($key, $prefix)) {
                    unset($deferred[$key]);
                }
            }
        }

        AdapterUtil::setPropertyValue($this, 'deferred', $deferred);
    }
1350076
public function setStatus(array $status) : void
    {
        Assert::keyExists($status, "Code", 'Cannot set status without a Code key in the array.');

        $this->status = $status;
        if (!array_key_exists('SubCode', $status)) {
            $this->status['SubCode'] = null;
        }
        if (!array_key_exists('Message', $status)) {
            $this->status['Message'] = null;
        }
    }
412566
public function whitelist($classes)
	{
		if ( ! is_array($classes))
		{
			$classes = func_get_args();
		}

		$this->whitelist = array_unique(array_merge($this->whitelist, $classes));
	}
1004757
public function setViews(array $views)
    {
        $this->views = array();

        foreach ($views as $view) {
            $this->addView($view);
        }
    }