src/db/orm/PersistableObject.php
public static function populateNew($class, array $row) {
        if (static::class != __CLASS__)                  throw new IllegalAccessException('Cannot access method '.__METHOD__.'() on a derived class.');
        if (!is_a($class, __CLASS__, $allowString=true)) throw new InvalidArgumentException('Not a '.__CLASS__.' subclass: '.$class);

        /** @var self $object */
        $object = new $class();
        $object->populate($row);
        return $object;
    }
public static function populateNew($class, array $row) {
        if (static::class != __CLASS__)                  throw new IllegalAccessException('Cannot access method '.__METHOD__.'() on a derived class.');
        if (!is_a($class, __CLASS__, $allowString=true)) throw new InvalidArgumentException('Not a '.__CLASS__.' subclass: '.$class);

        /** @var self $object */
        $object = new $class();
        $object->populate($row);
        return $object;
    }
public static function populateNew ( $ class , array $ row ) { if ( static :: class != __CLASS__ ) throw new IllegalAccessException ( 'Cannot access method ' . __METHOD__ . '() on a derived class.' ) ; if ( ! is_a ( $ class , __CLASS__ , $ allowString = true ) ) throw new InvalidArgumentException ( 'Not a ' . __CLASS__ . ' subclass: ' . $ class ) ; /** @var self $object */ $ object = new $ class ( ) ; $ object -> populate ( $ row ) ; return $ object ; }
Create a new instance and populate it with the specified properties. This method is called by the ORM to transform
database query result records to instances of the respective entity class.

@param  string $class - entity class name
@param  array  $row   - array with property values (a result row from a database query)

@return self
Create a new instance and populate it with the specified properties . This method is called by the ORM to transform database query result records to instances of the respective entity class .