Finds a resource entry in the manifest.json data.

@param string      $name
@param string|null $entry

@return mixed
171973
public function getResource(string $name, string $entry = null)
    {
        return $this->get('resources', $name, $entry);
    }
589124
public function findNeedByName($name)
    {
        // No needs defined yet.
        if (is_null($this->needs)) {
            return null;
        }

        // Traverse and Return.
        return $this->traverseNodesAndFindBy('name', $name, $this->needs);
    }
1232992
protected function findRole($name)
    {
        $role = $this->authManager->getRole($name);

        if ($role instanceof Role) {
            return $role;
        }

        return null;
    }
133342
public function getPost(string $name = null)
    {
        if ($name === null) {
            return $this->post;
        }

        return $this->resolvePath($this->post, $name);
    }
1085308
public function getMemoEntryId($name) {
        return isset($this->memoEntries[$name]) ? $this->memoEntries[$name] : null;
    }
820084
protected function getResourceOwnerCheckPath($name)
    {
        foreach ($this->ownerMaps as $ownerMap) {
            if ($potentialResourceOwnerCheckPath = $ownerMap->getResourceOwnerCheckPath($name)) {
                return $potentialResourceOwnerCheckPath;
            }
        }

        return null;
    }
811307
protected static function _find_package($name = null)
	{
		$files = array();

		if ($name)
		{
			// find a package
			foreach (\Config::get('package_paths', array(PKGPATH)) as $p)
			{
				$found = new \GlobIterator($p.$name.DS.\Config::get('migrations.folder').'*_*.php');
				if (count($found))
				{
					foreach($found as $file)
					{
						$files[] = $file->getPathname();
					}
					break;
				}
			}
		}
		else
		{
			// find all packages
			foreach (\Config::get('package_paths', array(PKGPATH)) as $p)
			{
				$found = new \GlobIterator($p.'*'.DS.\Config::get('migrations.folder').'*_*.php');
				foreach($found as $file)
				{
					$files[] = $file->getPathname();
				}
			}
		}

		return $files;
	}
478189
public function findById($name, $id) {
        $this->load();
        $mapper = MapperBuilder::buildFromName($this->mapping, $name);

        $newEntity = NULL;

        $query = "SELECT * FROM `" . $mapper->getTable() . "` WHERE id = :id";

        $result = $this->getDataSource()->query($query, array(":id" => $id));

        if ($result) {
            $newEntity = $mapper->createObject($result[0]);

            /* relations */
            foreach ($mapper->getRelations() as $relation) {

                /* only set relations if not lazy */
                if (!$relation->isLazy()) {
                    $relMapper = MapperBuilder::buildFromName($this->mapping, $relation->getEntity());

                    $queryRel = QueryBuilder::buildSelectRelation($relation, $relMapper);

                    $resRel = $this->getDataSource()->query($queryRel, array(":id" => $newEntity->getId()));

                    $method = "set" . $relation->getName();
                    if ($resRel) {
                        $collection = new Collection($relMapper->getClass(), $resRel, $relMapper);
                    } else {
                        $collection = new Collection($relMapper->getClass(), array(), $relMapper);
                    }
                    $newEntity->$method($collection);
                }
            }
        }
        return $newEntity;
    }
647330
public function findByName($name)
    {
        return Arr::first($this->items, function ($key, Contract $skill) use ($name) {
            return $skill->getName() === strtolower($name);
        }, null);
    }
1060396
protected function findPaymentMethodMapperByName($name)
    {
        if (array_key_exists($name, $this->registeredMethodMappers)) {
            return $this->registeredMethodMappers[$name];
        }

        return null;
    }
60775
public function getSlotArguments($name)
    {
        if (false === $this->hasSlot($name)) {
            throw EntryNotFoundException::slotArgumentsSlotNotFound($name);
        }

        return $this->arguments[$name];
    }
1141054
public function findMatched($name, $default = null)
    {
        if (is_null($name)) {
            return $default;
        }
        if (!in_array($name, $this->areas)) {
            return $default;
        }
        return $name;
    }
913147
public function getEntriesAction($objectClass, $name)
    {
        $entries = [];
        $server = $this->ldap->get($name);
        $user = isset($server['user']) ? $server['user'] : null;
        $password = isset($server['password']) ? $server['password'] : null;

        if ($this->ldap->connect($server, $user, $password)) {
            if ($search = $this->ldap->search($this->ldap->get($name), '(&(objectClass='.$objectClass.'))')) {
                $entries = $this->ldap->getEntries($search);
            }

            $this->ldap->close();
        }

        return new Response(json_encode($entries));
    }
135330
public function findEndpoint($name)
    {
        $endpointArr = null;

        foreach($this->endpoints as $key => $value)
        {
            if(strpos($name, $key) !== false)
            {
                $endpointArr = [$key => $value];
                break;
            }
        }

        return $endpointArr;
    }
1081814
public function get($name, $param, $meta = false)
	{
		$fileDir = $this->cache . '/' . $name;
		$filePath = $fileDir . '/' . $param . '.json';
		if(!is_file($filePath))
		{
			return null;
		}
		$object = json_decode(file_get_contents($filePath), true);
		if($meta)
		{
			return $object;
		}
		return $object['data'];
	}
820542
public URL findResource(final String name) {

        if (log.isDebugEnabled())
            log.debug("    findResource(" + name + ")");

        URL url = null;

        ResourceEntry entry = (ResourceEntry) resourceEntries.get(name);
        if (entry == null) {
            entry = findResourceInternal(name, name);
        }
        if (entry != null) {
            url = entry.source;
        }

        if ((url == null) && hasExternalRepositories)
            url = super.findResource(name);

        if (log.isDebugEnabled()) {
            if (url != null)
                log.debug("    --> Returning '" + url.toString() + "'");
            else
                log.debug("    --> Resource not found, returning null");
        }
        return (url);

    }
564570
public function find( $name )
    {
        $name = (string) $name;
        $path = $this->getSavePath();

        if ( ! is_file( $path . $name ) )
        {
            return null;
        }

        return $this->createStructure( array(
            'name' => $name,
            'code' => @ file_get_contents( $path . $name ),
        ) );
    }