squeezr/lib/Tollwerk/Squeezr/Css.php
/**
     * Determine / create and return a breakpoint index entry
     *
     * @param int $type Breakpoint type
     * @param array $condition Condition values
     * @return int                                    Breakpoint index
     */
Determine / create and return a breakpoint index entry
@param int $type Breakpoint type
@param array $condition Condition values
@return int                                    Breakpoint index
Determine / create and return a breakpoint index entry @param int $type Breakpoint type @param array $condition Condition values @return int Breakpoint index
protected function _breakpointIndex($type, array $condition)
    {
        ksort($condition);
        $serializedCondition = array();
        foreach ($condition as $unit => $value) {
            $serializedCondition[] = $value.$unit;
        }
        $serializedCondition = implode('/', $serializedCondition);
        if (!array_key_exists($serializedCondition, $this->_breakpointCatalog[$type])) {
            $this->_breakpointCatalog[$type][$serializedCondition] = count($this->_breakpointIndex);
            $this->_breakpointIndex[$this->_breakpointCatalog[$type][$serializedCondition]] = array(
                self::$_breakpointTypes[$type],
                $condition
            );
        }
        return $this->_breakpointCatalog[$type][$serializedCondition];
    }
protected function _breakpointIndex ( $ type , array $ condition ) { ksort ( $ condition ) ; $ serializedCondition = array ( ) ; foreach ( $ condition as $ unit => $ value ) { $ serializedCondition [ ] = $ value . $ unit ; } $ serializedCondition = implode ( '/' , $ serializedCondition ) ; if ( ! array_key_exists ( $ serializedCondition , $ this -> _breakpointCatalog [ $ type ] ) ) { $ this -> _breakpointCatalog [ $ type ] [ $ serializedCondition ] = count ( $ this -> _breakpointIndex ) ; $ this -> _breakpointIndex [ $ this -> _breakpointCatalog [ $ type ] [ $ serializedCondition ] ] = array ( self :: $ _breakpointTypes [ $ type ] , $ condition ) ; } return $ this -> _breakpointCatalog [ $ type ] [ $ serializedCondition ] ; }
Determine / create and return a breakpoint index entry
 @param int $type Breakpoint type
 @param array $condition Condition values
 @return int                                    Breakpoint index
Determine / create and return a breakpoint index entry @param int $type Breakpoint type @param array $condition Condition values @return int Breakpoint index
// Normalize condition values // If a breakpoint at this width has not yet been registered