src/Space.php
/**
     * Get matching objects
     *
     * @param string $searchString
     * @return array
     */
Get matching objects
@param string $searchString
@return array
Get matching objects @param string $searchString @return array
public static function search($searchString)
    {
        $class = substr(strrchr(static::class, '\\'), 1);
        $endpoint = strtolower($class);
        $resp = static::getConnection()->execGET("{$endpoint}.json?{$searchString}");
        $data = json_decode($resp->getData(), true);
        $objects = array();
        foreach ($data["{$class}s"] as $record) {
            $object = new static($record);
            array_push($objects, $object);
        }
        return $objects;
    }
public static function search ( $ searchString ) { $ class = substr ( strrchr ( static :: class , '\\' ) , 1 ) ; $ endpoint = strtolower ( $ class ) ; $ resp = static :: getConnection ( ) -> execGET ( " { $ endpoint } .json? { $ searchString } " ) ; $ data = json_decode ( $ resp -> getData ( ) , true ) ; $ objects = array ( ) ; foreach ( $ data [ " { $ class } s " ] as $ record ) { $ object = new static ( $ record ) ; array_push ( $ objects , $ object ) ; } return $ objects ; }
Get matching objects
 @param string $searchString
 @return array
Get matching objects @param string $searchString @return array