Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 11th, 2012  |  syntax: None  |  size: 0.74 KB  |  hits: 18  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2.  
  3. namespace OmegaTech\System;
  4.  
  5. /** @Entity */
  6. class Page extends Resource {
  7.  
  8.         /**
  9.         * @Column(length=50, unique=true)
  10.         */
  11.         public $path;
  12.  
  13.         /**
  14.         * @OneToMany(targetEntity="Page", mappedBy="parent")
  15.         */
  16.         private $children;
  17.  
  18.         /**
  19.         * @ManyToOne(targetEntity="Page", inversedBy="children")
  20.         */
  21.         private $parent;
  22.  
  23.         /**
  24.         * @Column(type="text")
  25.         */
  26.         public $source;
  27.  
  28.         /**
  29.         * @Column(type="boolean")
  30.         */
  31.         public $public;
  32.  
  33.         /**
  34.         * @Column(type="boolean")
  35.         */
  36.         public $enabled;
  37.  
  38.  
  39.         // Oh my god, domain knowledge!
  40.         public static function dispatch($entityManager, $requestedPath) {
  41.  
  42.                 // Debugging.
  43.                 print_r($requestedPath);
  44.  
  45.  
  46.                 // Query the database for the URL.
  47.  
  48.  
  49.                 return(true);
  50.                 return(false);
  51.  
  52.         }
  53.  
  54. }
  55.  
  56. ?>