Beispiel #1
0
 /**
  * @param array|string $obj
  * @throws ApplicationException
  * @throws UnauthorizedException
  */
 public function __construct($obj)
 {
     if (is_array($obj)) {
         $this->playlist = $obj;
     } else {
         if (is_scalar($obj)) {
             $this->playlist = PlaylistDao::get($obj);
         } else {
             throw new ApplicationException("Wrong type of argument");
         }
     }
     $this->checkPermission();
 }