public static function fromId($scriptId)
{
$scriptTable = new Model();
$row = $scriptTable->fetchRow($scriptTable->select(array('id' => (int) $scriptId)));
$scriptTable->events()->trigger(__CLASS__, 'before.load', $scriptTable);
if (!empty($row)) {
$scriptTable = self::fromArray((array) $row);
$scriptTable->events()->trigger(__CLASS__, 'after.load', $scriptTable);
return $scriptTable;
} else {
$scriptTable->events()->trigger(__CLASS__, 'after.load.failed', $scriptTable);
return false;
}
}