/**
  * A key value pair of values that should be searched for.
  * The keys should match the field names specified in {@link self::$fields}.
  * Usually these values come from a submitted searchform
  * in the form of a $_REQUEST object.
  * CAUTION: All values should be treated as insecure client input.
  *
  * @param string $modelClass The base {@link DataObject} class that search properties related to.
  * 						Also used to generate a set of result objects based on this class.
  * @param FieldList $fields Optional. FormFields mapping to {@link DataObject::$db} properties
  *	 					which are to be searched. Derived from modelclass using
  *						{@link DataObject::scaffoldSearchFields()} if left blank.
  * @param array $filters Optional. Derived from modelclass if left blank
  */
 public function __construct($modelClass, $fields = null, $filters = null)
 {
     $this->modelClass = $modelClass;
     $this->fields = $fields ? $fields : new FieldList();
     $this->filters = $filters ? $filters : array();
     parent::__construct();
 }
 public function __construct($content)
 {
     if (extension_loaded('tidy')) {
         // using the tidy php extension
         $tidy = new tidy();
         $tidy->parseString($content, array('output-xhtml' => true, 'numeric-entities' => true, 'wrap' => 0), 'utf8');
         $tidy->cleanRepair();
         $tidy = str_replace('xmlns="http://www.w3.org/1999/xhtml"', '', $tidy);
         $tidy = str_replace(' ', '', $tidy);
     } elseif (@shell_exec('which tidy')) {
         // using tiny through cli
         $CLI_content = escapeshellarg($content);
         $tidy = `echo {$CLI_content} | tidy --force-output 1 -n -q -utf8 -asxhtml -w 0 2> /dev/null`;
         $tidy = str_replace('xmlns="http://www.w3.org/1999/xhtml"', '', $tidy);
         $tidy = str_replace(' ', '', $tidy);
     } else {
         // no tidy library found, hence no sanitizing
         $tidy = $content;
     }
     $this->simpleXML = @simplexml_load_string($tidy, 'SimpleXMLElement', LIBXML_NOWARNING);
     if (!$this->simpleXML) {
         throw new Exception('CSSContentParser::__construct(): Could not parse content.' . ' Please check the PHP extension tidy is installed.');
     }
     parent::__construct();
 }
 /**
  *
  * @param integer $currentID - The ID of the current item; this button will find that item's parent
  */
 public function __construct($currentID)
 {
     parent::__construct();
     if ($currentID && is_numeric($currentID)) {
         $this->currentID = $currentID;
     }
 }
 /**
  * @param $locale
  */
 public function __construct($locale = null)
 {
     $this->defaultLocale = $locale ? $locale : i18n::get_lang_from_locale(i18n::config()->get('default_locale'));
     $this->basePath = Director::baseFolder();
     $this->baseSavePath = Director::baseFolder();
     parent::__construct();
 }
 /**
  * Create a new CMS Menu Item
  *
  * @param string $title
  * @param string $url
  * @param string $controller Controller class name
  * @param integer $priority The sort priority of the item
  */
 public function __construct($title, $url, $controller = null, $priority = -1)
 {
     $this->title = $title;
     $this->url = $url;
     $this->controller = $controller;
     $this->priority = $priority;
     parent::__construct();
 }
 /**
  * Create a new ValidationResult.
  * By default, it is a successful result.    Call $this->error() to record errors.
  *
  * @param bool $valid
  * @param string $message
  */
 public function __construct($valid = true, $message = null)
 {
     $this->isValid = $valid;
     if ($message) {
         $this->errorList[] = $message;
     }
     parent::__construct();
 }
 public function __construct(AssetContainer $assetContainer = null)
 {
     parent::__construct();
     $this->cache = Cache::factory('GDBackend_Manipulations');
     if ($assetContainer) {
         $this->loadFromContainer($assetContainer);
     }
 }
 /**
  * @param string $fullName Determines the name of the field, as well as the searched database
  *  column. Can contain a relation name in dot notation, which will automatically join
  *  the necessary tables (e.g. "Comments.Name" to join the "Comments" has-many relationship and
  *  search the "Name" column when applying this filter to a SiteTree class).
  * @param mixed $value
  * @param array $modifiers
  */
 public function __construct($fullName = null, $value = false, array $modifiers = array())
 {
     parent::__construct();
     $this->fullName = $fullName;
     // sets $this->name and $this->relation
     $this->addRelation($fullName);
     $this->value = $value;
     $this->setModifiers($modifiers);
 }
 /**
  * @param array $config The configuration for the cleaner, if necessary
  */
 public function __construct($config = null)
 {
     parent::__construct();
     if ($config) {
         $config = array_merge($this->defaultConfig, $config);
     } else {
         $config = $this->defaultConfig;
     }
     $this->setConfig($config);
 }
 /**
  * @param DataObject $obj
  */
 public function __construct($obj)
 {
     $this->obj = $obj;
     parent::__construct();
 }
 /**
  *
  */
 public function __construct()
 {
     parent::__construct();
     $this->components = new ArrayList();
 }
 /**
  * @param string $fixture Absolute file path, or relative path to {@link Director::baseFolder()}
  */
 public function __construct($fixture)
 {
     if (false !== strpos($fixture, "\n")) {
         $this->fixtureString = $fixture;
     } else {
         if (!Director::is_absolute($fixture)) {
             $fixture = Director::baseFolder() . '/' . $fixture;
         }
         if (!file_exists($fixture)) {
             throw new InvalidArgumentException('YamlFixture::__construct(): Fixture path "' . $fixture . '" not found');
         }
         $this->fixtureFile = $fixture;
     }
     parent::__construct();
 }
 /**
  * Open a CSV file for parsing.
  *
  * You can use the object returned in a foreach loop to extract the data.
  *
  * @param string $filename The name of the file.  If relative, it will be relative to the site's base dir
  * @param string $delimiter The character for seperating columns
  * @param string $enclosure The character for quoting or enclosing columns
  */
 public function __construct($filename, $delimiter = ",", $enclosure = '"')
 {
     $filename = Director::getAbsFile($filename);
     $this->filename = $filename;
     $this->delimiter = $delimiter;
     $this->enclosure = $enclosure;
     parent::__construct();
 }
 public function __construct()
 {
     $this->constructArguments = func_get_args();
     parent::__construct();
 }
 /**
  * @param DateField $field
  */
 public function __construct($field)
 {
     parent::__construct();
     $this->field = $field;
 }
 public function __construct()
 {
     _t('i18nTestModule.OTHERENTITY', 'Other Entity');
     parent::__construct();
 }
 /**
  * @param $name
  */
 public function __construct($name = null)
 {
     $this->name = $name ? $name : self::get_default_name();
     parent::__construct();
 }