SassList::length PHP Method

length() public method

public length ( )
    public function length()
    {
        return count($this->value);
    }

Usage Example

示例#1
0
 /**
  * Returns the length of the $list
  * @param SassList - the list to count
  * @return SassNumber
  */
 public static function length($list)
 {
     if ($list instanceof SassString) {
         $list = new SassList($list->toString());
     }
     return new SassNumber($list->length());
 }