/** * map instances to all records * * returns an array of instances mapped * to records in a table * * @param array **/ public static function findAll() { $rows = Actions::select(static::getTableName(), ['*']); $models = []; foreach ($rows as $row) { $instance = self::fromRow($row); $models[] = $instance; } return $models; }