Example #1
0
 /**
  *
  * für 2 neue Objekte wird objectEquals aufgerufen, dies kann dann notfalls von der Subklasse überschrieben werden
  * ansonsten wird auf identität geprüft
  * @return bool
  */
 public function equals(\Psc\Doctrine\Object $otherObject = NULL)
 {
     if ($otherObject == NULL) {
         return FALSE;
     }
     if ($this->getIdentifier() === NULL && $otherObject->getIdentifier() === NULL) {
         return $this->objectEquals($otherObject);
     }
     return $this->getIdentifier() === $otherObject->getIdentifier();
 }
Example #2
0
    /**
     * @TODO das hier geht noch nicht
     * Das Problem ist, dass ich nicht weiß ,wie ich Abfrage ob User oder eine Subklasse von User schon von doctrine geladen wird (dann wollen wir nicht automatisch installieren)
     * */
    public static function installEntity(\Psc\Doctrine\Object $object)
    {
        $em = $object->getEM();
        throw new Exception('Dies hier muss noch gebaut werden');
        if (Config::get('cms.installEntities') == TRUE) {
            $code = '
namespace Entities;

/**
 * @Entity
 * @Table(name="users")
 */
class User extends \\Psc\\CMS\\User {
  
}';
        }
    }