public function getLocation($condition)
    {
        // iterate over all locations
        /** @var \AppserverIo\Appserver\Core\Api\Node\LocationNode $location */
        foreach ($this->getLocations() as $location) {
            // if we found one with a matching condition we will return it
            if ($location->getCondition() === $condition) {
                return $location;
            }
        }

        // Still here? Seems we did not find anything
        return false;
    }
public function getLocation($condition)
    {
        // iterate over all locations
        /** @var \AppserverIo\Appserver\Core\Api\Node\LocationNode $location */
        foreach ($this->getLocations() as $location) {
            // if we found one with a matching condition we will return it
            if ($location->getCondition() === $condition) {
                return $location;
            }
        }

        // Still here? Seems we did not find anything
        return false;
    }
public function getLocation ( $ condition ) { // iterate over all locations /** @var \AppserverIo\Appserver\Core\Api\Node\LocationNode $location */ foreach ( $ this -> getLocations ( ) as $ location ) { // if we found one with a matching condition we will return it if ( $ location -> getCondition ( ) === $ condition ) { return $ location ; } } // Still here? Seems we did not find anything return false ; }
Will return the location node with the specified condition and if nothing could be found we will return false.

@param string $condition The condition of the location in question

@return \AppserverIo\Appserver\Core\Api\Node\LocationNode|boolean The requested location node
Will return the location node with the specified condition and if nothing could be found we will return false .