arrayValues() public static method

public static arrayValues ( $collection )
Beispiel #1
0
 /**
  * @param array $collection
  * @return array
  */
 public function filter($collection)
 {
     if (AccessHelper::keyExists($collection, $this->token->value, $this->magicIsAllowed)) {
         return array(AccessHelper::getValue($collection, $this->token->value, $this->magicIsAllowed));
     } else {
         if ($this->token->value === "*") {
             return AccessHelper::arrayValues($collection);
         }
     }
     return array();
 }
Beispiel #2
0
 private function recurse(&$result, $data)
 {
     $result[] = $data;
     if (AccessHelper::isCollectionType($data)) {
         foreach (AccessHelper::arrayValues($data) as $key => $value) {
             $results[] = $value;
             if (AccessHelper::isCollectionType($value)) {
                 $this->recurse($result, $value);
             }
         }
     }
 }