for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Bright Nucleus View Component.
*
* @package BrightNucleus\View
* @author Alain Schlesser <[email protected]>
* @license MIT
* @link http://www.brightnucleus.com/
* @copyright 2016 Alain Schlesser, Bright Nucleus
*/
namespace BrightNucleus\View\Engine;
use BrightNucleus\View\Support\AbstractFinder;
* Class BaseEngineFinder.
* @since 0.1.0
* @package BrightNucleus\View\Engine
class BaseEngineFinder extends AbstractFinder
{
* Find a result based on a specific criteria.
* @param array $criteria Criteria to search for.
* @return Engine Result of the search.
public function find(array $criteria)
$this->initializeFindables();
foreach ($criteria as $entry) {
foreach ($this->findables as $engine) {
if ($engine->canHandle($entry)) {
return $engine;
}
return $this->getNullObject();
* Get the config key for the Findables definitions.
* @return string Config key use to define the Findables.
protected function getFindablesConfigKey()
return 'Engines';