Hydrate a collection of controller objects into a collection of
ControllerEntity objects

@param stdClass[] $controllers
@return ControllerEntity[]
976548
public static function hydrateCollection(array $controllers)
    {
        $hydrated = [];

        foreach ($controllers as $controller) {
            $hydrated[] = self::hydrate($controller);
        }

        return $hydrated;
    }
91047
public static function hydrateCollection(array $queues)
    {
        $hydrated = [];

        foreach ($queues as $queue) {
            $hydrated[] = self::hydrate($queue);
        }

        return $hydrated;
    }
1043922
public static function hydrateCollection(array $modifications)
    {
        $hydrated = [];

        foreach ($modifications as $modification) {
            $hydrated[] = self::hydrate($modification);
        }

        return $hydrated;
    }
251641
protected function getControllers()
	{
		if( $this->controllers === [] )
		{
			$subFolder = substr( str_replace( '\\', DIRECTORY_SEPARATOR, $this->getClassPrefix() ), 7 );

			foreach( $this->cntlPaths as $path => $list )
			{
				foreach( $list as $relpath )
				{
					$path .= DIRECTORY_SEPARATOR . $relpath . DIRECTORY_SEPARATOR . $subFolder;

					if( is_dir( $path ) ) {
						$this->addControllers( new \DirectoryIterator( $path ) );
					}
				}
			}
		}

		return $this->controllers;
	}
270154
public static function hydrate( array $items, $connection = null )
	{
		$instance = ( new static )->setConnection( $connection );

		$items = array_map( function ( $item ) use ( $instance )
		{
			return $instance->newFromBuilder( $item );
		}, $items );

		return $instance->newCollection( $items );
	}
31327
public static function hydrateCollection(array $callbacks)
    {
        $hydrated = [];

        foreach ($callbacks as $callback) {
            $hydrated[] = self::hydrate($callback);
        }

        return $hydrated;
    }
1198723
public function getSkipActions(string $controller): array
    {
        return !empty($this->skipActions[$controller]) ? $this->skipActions[$controller] : [];
    }
1139754
public function hydrateCommands(array $commands) : array
    {
        $modulesDone = [];

        foreach ($this->finder->getModuleList() as $module) {
            $moduleName = basename($module);

            if (!\in_array($moduleName, $modulesDone, true)) {
                $facade = Locator::getInstance()->{$moduleName}()->facade();
                if (method_exists($facade, 'getCommands')) {
                    $commands = \array_merge($commands, $facade->getCommands());
                }
                $modulesDone[] = $moduleName;
            }
        }

        return $commands;
    }
299792
public static function hydrateCollection(array $clients)
    {
        $hydrated = [];

        foreach ($clients as $client) {
            $hydrated[] = self::hydrate($client);
        }

        return $hydrated;
    }
680106
public function hydrate(array $properties)
    {
        foreach ($properties as $prop => $val) {
            if (property_exists($this, $prop)) {
                $this->{$prop} = $val;
            }
        }

        return $this;
    }
1220530
public static function hydrateCollection(array $parts)
    {
        $hydrated = [];

        foreach ($parts as $part) {
            $hydrated[] = self::hydrate($part);
        }

        return $hydrated;
    }
424584
public static function hydrateCollection(array $contexts)
    {
        $hydrated = [];

        foreach ($contexts as $context) {
            $hydrated[] = self::hydrate($context);
        }

        return $hydrated;
    }
789236
public static function getAllCapabilities(): array
    {
        $result = [];
        foreach (Utility::getControllers() as $controller) {
            if (!is_callable([$controller, 'getCapabilities'])) {
                continue;
            }

            $result[$controller] = $controller::getCapabilities($controller);
        }

        return $result;
    }
1137698
public function resources(array $controllers)
    {
        $resource = new RouteResource;
        foreach ($controllers as $controller)
            $resource->set($this->resource($controller));
        return $resource;
    }
1322887
public function hydrateCollection(array $collection)
    {
        $records = array();

        foreach ($collection as $key => $record) {
            if ($record instanceof \stdClass) {
                $records[$key] = $this->hydrate($record);
            } else {
                $records[$key] = $this->hydrateRid(new Rid($record));
            }
        }

        return new ArrayCollection($records);
    }
1075510
public static function hydrateCollection(array $censuses)
    {
        $hydrated = [];

        foreach ($censuses as $census) {
            $hydrated[] = self::hydrate($census);
        }

        return $hydrated;
    }
369049
protected function getControllers()
    {
        $controllers = new Collection;

        if ($controller = $this->option('use-controller')) {
            $this->addControllerIfNotExists($controllers, app($controller));

            return $controllers;
        }

        foreach ($this->router->getRoutes() as $collections) {
            foreach ($collections as $route) {
                if ($controller = $route->getControllerInstance()) {
                    $this->addControllerIfNotExists($controllers, $controller);
                }
            }
        }

        return $controllers;
    }