public function getSharedInstanceWithParameters($classOrAlias, array $params, $fastHashFromHasLookup = null)
        {
            if ($fastHashFromHasLookup) {
                return $this->sharedInstancesWithParams['hashLong'][$fastHashFromHasLookup];
            }

            ksort($params);
            $hashKey = $this->createHashForKeys($classOrAlias, array_keys($params));

            if (isset($this->sharedInstancesWithParams['hashShort'][$hashKey])) {
                $hashValue = $this->createHashForValues($classOrAlias, $params);

                if (isset($this->sharedInstancesWithParams['hashLong'][$hashKey . '/' . $hashValue])) {
                    return $this->sharedInstancesWithParams['hashLong'][$hashKey . '/' . $hashValue];
                }
            }

            return false;
        }
public function getSharedInstanceWithParameters($classOrAlias, array $params, $fastHashFromHasLookup = null)
        {
            if ($fastHashFromHasLookup) {
                return $this->sharedInstancesWithParams['hashLong'][$fastHashFromHasLookup];
            }

            ksort($params);
            $hashKey = $this->createHashForKeys($classOrAlias, array_keys($params));

            if (isset($this->sharedInstancesWithParams['hashShort'][$hashKey])) {
                $hashValue = $this->createHashForValues($classOrAlias, $params);

                if (isset($this->sharedInstancesWithParams['hashLong'][$hashKey . '/' . $hashValue])) {
                    return $this->sharedInstancesWithParams['hashLong'][$hashKey . '/' . $hashValue];
                }
            }

            return false;
        }
public function getSharedInstanceWithParameters ( $ classOrAlias , array $ params , $ fastHashFromHasLookup = null ) { if ( $ fastHashFromHasLookup ) { return $ this -> sharedInstancesWithParams [ 'hashLong' ] [ $ fastHashFromHasLookup ] ; } ksort ( $ params ) ; $ hashKey = $ this -> createHashForKeys ( $ classOrAlias , array_keys ( $ params ) ) ; if ( isset ( $ this -> sharedInstancesWithParams [ 'hashShort' ] [ $ hashKey ] ) ) { $ hashValue = $ this -> createHashForValues ( $ classOrAlias , $ params ) ; if ( isset ( $ this -> sharedInstancesWithParams [ 'hashLong' ] [ $ hashKey . '/' . $ hashValue ] ) ) { return $ this -> sharedInstancesWithParams [ 'hashLong' ] [ $ hashKey . '/' . $ hashValue ] ; } } return false ; }
Retrieves an instance by its name and the parameters stored at its instantiation

@param  string      $classOrAlias
@param  array       $params
@param  bool|null   $fastHashFromHasLookup
@return object|bool false if no instance was found
Retrieves an instance by its name and the parameters stored at its instantiation