* @return integer A hash code. */ public function getHashCode() { return $this->getId(); } /** * Returns a textual representation of this object. * * @return string A string. */ public function __toString() { return $this->getClass()->getName() . '{' . strval($this) . '}'; } /** * Main program. * * @param array $args Command-line arguments. * @return integer Zero on success; non-zero on failure. */ public static function main($args) { printf("AbstractObject main program.\n"); $status = 0; return $status; } } if (realpath($argv[0]) == realpath(__FILE__)) { exit(AbstractObject::main(array_slice($argv, 1))); }