Library/Cache/SlotsCache.php
public static function getMethodSlot(ClassMethod $method)
    {
        $className = $method->getClassDefinition()->getCompleteName();
        $methodName = $method->getName();

        if (isset(self::$cacheMethodSlots[$className][$methodName])) {
            return self::$cacheMethodSlots[$className][$methodName];
        }

        $slot = self::$slot++;
        if ($slot >= self::MAX_SLOTS_NUMBER) {
            return 0;
        }

        self::$cacheMethodSlots[$className][$methodName] = $slot;

        return $slot;
    }
public static function getMethodSlot(ClassMethod $method)
    {
        $className = $method->getClassDefinition()->getCompleteName();
        $methodName = $method->getName();

        if (isset(self::$cacheMethodSlots[$className][$methodName])) {
            return self::$cacheMethodSlots[$className][$methodName];
        }

        $slot = self::$slot++;
        if ($slot >= self::MAX_SLOTS_NUMBER) {
            return 0;
        }

        self::$cacheMethodSlots[$className][$methodName] = $slot;

        return $slot;
    }
public static function getMethodSlot ( ClassMethod $ method ) { $ className = $ method -> getClassDefinition ( ) -> getCompleteName ( ) ; $ methodName = $ method -> getName ( ) ; if ( isset ( self :: $ cacheMethodSlots [ $ className ] [ $ methodName ] ) ) { return self :: $ cacheMethodSlots [ $ className ] [ $ methodName ] ; } $ slot = self :: $ slot ++ ; if ( $ slot >= self :: MAX_SLOTS_NUMBER ) { return 0 ; } self :: $ cacheMethodSlots [ $ className ] [ $ methodName ] = $ slot ; return $ slot ; }
Returns or creates a cache slot for a method.

@param ClassMethod $method

@return int
Returns or creates a cache slot for a method .