CLINIQUE

Stay-Matte Oil-Free Makeup

CHECK PRICE
What do you think?

Similar Foundation Finder

FIND FOUNDATION USING SIMILAR INGREDIENTS

Ingredients

Whoops! There was an error.
Whoops \ Exception \ ErrorException (E_WARNING)
Invalid argument supplied for foreach() Whoops\Exception\ErrorException thrown with message "Invalid argument supplied for foreach()" Stacktrace: #8 Whoops\Exception\ErrorException in /home3/y1ipv9n9/makeupbff.com/App/Views/Snippet/Product.php:26 #7 Whoops\Run:handleError in /home3/y1ipv9n9/makeupbff.com/App/Views/Snippet/Product.php:26 #6 App\Views\Snippet\Product:timelineIngredients in /home3/y1ipv9n9/makeupbff.com/App/Views/Home/Product.php:640 #5 require_once in /home3/y1ipv9n9/makeupbff.com/Core/View.php:28 #4 Core\View:render in /home3/y1ipv9n9/makeupbff.com/App/Controllers/Product.php:55 #3 App\Controllers\Product:indexAction in /home3/y1ipv9n9/makeupbff.com/Core/Controller.php:46 #2 call_user_func_array in /home3/y1ipv9n9/makeupbff.com/Core/Controller.php:46 #1 Core\Controller:__call in /home3/y1ipv9n9/makeupbff.com/Core/Router.php:132 #0 Core\Router:dispatch in /home3/y1ipv9n9/makeupbff.com/index.php:94
Stack frames (9)
8
Whoops
\
Exception
\
ErrorException
/
home3
/
y1ipv9n9
/
makeupbff.com
/
App
/
Views
/
Snippet
/
Product.php
26
7
Whoops
\
Run
handleError
/
home3
/
y1ipv9n9
/
makeupbff.com
/
App
/
Views
/
Snippet
/
Product.php
26
6
App
\
Views
\
Snippet
\
Product
timelineIngredients
/
home3
/
y1ipv9n9
/
makeupbff.com
/
App
/
Views
/
Home
/
Product.php
640
5
require_once
/
home3
/
y1ipv9n9
/
makeupbff.com
/
Core
/
View.php
28
4
Core
\
View
render
/
home3
/
y1ipv9n9
/
makeupbff.com
/
App
/
Controllers
/
Product.php
55
3
App
\
Controllers
\
Product
indexAction
/
home3
/
y1ipv9n9
/
makeupbff.com
/
Core
/
Controller.php
46
2
call_user_func_array
/
home3
/
y1ipv9n9
/
makeupbff.com
/
Core
/
Controller.php
46
1
Core
\
Controller
__call
/
home3
/
y1ipv9n9
/
makeupbff.com
/
Core
/
Router.php
132
0
Core
\
Router
dispatch
/
home3
/
y1ipv9n9
/
makeupbff.com
/
index.php
94
/
home3
/
y1ipv9n9
/
makeupbff.com
/
App
/
Views
/
Snippet
/
Product.php
     */

    namespace App\Views\Snippet;


    use App\Plugins\TextTools;
    use Core\Model;

    class Product
    {

        public static function timelineIngredients($data,
                                                   $ingredient_info_array,
                                                   $classified_ingredient_function_array,
                                                   $restrict_to = null) {


            $count = 1;
            $citation_sources = [];
            foreach ($data['detail_info'] as $row) {

                if(!isset($row['attribute'])) {
                    continue;
                }

                //option to restrict the ingredients to display
                if(isset($restrict_to) && !in_array($row['pv_id'], $restrict_to)) {
                    continue;
                }


                //generate function
                $function = '';
                if(isset($ingredient_info_array[$row['pv_id']])) {

                    //classify the function
                    if($classified_ingredient_function_array['classify_function'][$row['pv_id']]) {
                        $function = implode(", ", array_keys($classified_ingredient_function_array['classify_function'][$row['pv_id']]));

                    }
/
home3
/
y1ipv9n9
/
makeupbff.com
/
App
/
Views
/
Snippet
/
Product.php
     */

    namespace App\Views\Snippet;


    use App\Plugins\TextTools;
    use Core\Model;

    class Product
    {

        public static function timelineIngredients($data,
                                                   $ingredient_info_array,
                                                   $classified_ingredient_function_array,
                                                   $restrict_to = null) {


            $count = 1;
            $citation_sources = [];
            foreach ($data['detail_info'] as $row) {

                if(!isset($row['attribute'])) {
                    continue;
                }

                //option to restrict the ingredients to display
                if(isset($restrict_to) && !in_array($row['pv_id'], $restrict_to)) {
                    continue;
                }


                //generate function
                $function = '';
                if(isset($ingredient_info_array[$row['pv_id']])) {

                    //classify the function
                    if($classified_ingredient_function_array['classify_function'][$row['pv_id']]) {
                        $function = implode(", ", array_keys($classified_ingredient_function_array['classify_function'][$row['pv_id']]));

                    }
/
home3
/
y1ipv9n9
/
makeupbff.com
/
App
/
Views
/
Home
/
Product.php

                        </div>
                    </div>

                    <!-- / similar products-->


                </div>


                <!-- COLUMN 2-->
                <div class="col-md-6">


                    <!-- ingredients-->

                    <h2 id="IngredientDetails" class="text-bold text-center">Ingredients</h2>

                    <?= App\Views\Snippet\Product::timelineIngredients($data, $ingredient_info_array, $classified_ingredient_function_array) ?>

                    <!-- /ingredients-->


                </div>


            </div>
            <!-- /info blocks -->

            <div class="row">
                <div class="col-xs-12">

                    <a href="<?= \App\Plugins\URLFormat::amazonSearch($data['basic_info']['brand'] . " " . $data['basic_info']['model']); ?>"
                       class="btn bg-blue mt-10 btn-block btn-flat p-20"><i class="icon-bag"></i> CHECK PRICE</a>

                </div>
            </div>


/
home3
/
y1ipv9n9
/
makeupbff.com
/
Core
/
View.php
namespace Core;


class View
{

    /**
     * @param string $view the folder/file.php template
     * @param array $arg
     * @throws \Exception
     */
    public static function render($view, $arg = [])
    {

        //extract all the arg
        extract($arg, EXTR_SKIP);

        $file = 'App/Views/' . $view;
        if (is_readable($file)) {
            require_once $file;
        } else {
            throw new \Exception($file . ' not found');
        }
    }

}
/
home3
/
y1ipv9n9
/
makeupbff.com
/
App
/
Controllers
/
Product.php
            $data['data']['detail_info'] = \App\Models\Api\Product::detailed_detail($p_id);
            $data['data']['detail_info'] = \App\Format\Product::attach_useful_keys_from_array_db($data['data']['detail_info'], 'pv_id');

            //generate pv_id to get ingredient details
            $pv_id = \App\Format\Product::grab_all_pv_id_from_current_product_detail($data['data']['detail_info']);

            $data['data']['ingredient_info'] = \App\Models\Api\Product::ingredient_detail($pv_id);


            $data['data']['similar_products_info'] = \App\Models\Api\Product::find_products_with_similar_ingredients($pv_id);

            //pull basic info for similar products
            $keys = (isset($data['data']['similar_products_info']['highest_p_id'])?array_keys($data['data']['similar_products_info']['highest_p_id']):false);
            $data['data']['similar_products'] = \App\Models\Api\Product::basic_detail($keys);
            //clean up the array to make it easier to display
            $data['data']['similar_products'] = \App\Format\Product::attach_useful_keys_from_array_db($data['data']['similar_products'],'p_id');


            View::render("Home/Product.php", $data);

            //basic product info
            //detail product info
            //meta details product info

        }


    }
/
home3
/
y1ipv9n9
/
makeupbff.com
/
Core
/
Controller.php
     * Magic method called when a non-existent or inaccessible method is
     * called on an object of this class. Used to execute before and after
     * filter methods on action methods. Action methods need to be named
     * with an "Action" suffix, e.g. indexAction, showAction etc.
     *
     * @param string $name Method name
     * @param array $args Arguments passed to the method
     *
     * @return void
     */
    public function __call($name, $args)
    {

        $method = $name . 'Action';

        if (method_exists($this, $method)) {
            //call code before
            if ($this->before() !== false) {
                //call the original method name
                call_user_func_array([$this, $method], $args);
                //call code after
                $this->after();
            }
        } else {
            throw new \Exception("method $method not found in controller " . get_class($this));
        }
    }


    protected function before()
    {

        //initialize localhost or production settings
        ConfigLocalProd::init();

        //grab current persons information
        \App\Models\User::grabCurrentUserInfo();



/
home3
/
y1ipv9n9
/
makeupbff.com
/
Core
/
Controller.php
     * Magic method called when a non-existent or inaccessible method is
     * called on an object of this class. Used to execute before and after
     * filter methods on action methods. Action methods need to be named
     * with an "Action" suffix, e.g. indexAction, showAction etc.
     *
     * @param string $name Method name
     * @param array $args Arguments passed to the method
     *
     * @return void
     */
    public function __call($name, $args)
    {

        $method = $name . 'Action';

        if (method_exists($this, $method)) {
            //call code before
            if ($this->before() !== false) {
                //call the original method name
                call_user_func_array([$this, $method], $args);
                //call code after
                $this->after();
            }
        } else {
            throw new \Exception("method $method not found in controller " . get_class($this));
        }
    }


    protected function before()
    {

        //initialize localhost or production settings
        ConfigLocalProd::init();

        //grab current persons information
        \App\Models\User::grabCurrentUserInfo();



/
home3
/
y1ipv9n9
/
makeupbff.com
/
Core
/
Router.php
        $url = $this->removeQueryStringVariables($url);
        if ($this->match($url)) {
            $controller = $this->params['controller'];
            $controller = $this->convertToStudlyCaps($controller);
            //add namespace
            $controller = $this->getNamespace() . $controller;

            //if the class exists
            if (class_exists($controller)) {
                //init the class and pass any parameters from the router
                $controller_object = new $controller($this->params);

                //convert the action to camcelCase
                $action = (isset($this->params['action']) ? $this->params['action'] : null);
                $action = $this->convertToCamelCase($action);

                //if the action exists
                if (is_callable([$controller_object, $action])) {
                    //init the class and method and pass any parameters from the router
                    $controller_object->$action($this->params);
                } else {
                    header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found", true, 404);
                    //TODO: log error
                    header("LOCATION: ".ConfigLocalProd::$website_url."NotFound/");
                    die();
                    throw new \Exception("Method $action (in controller $controller) not found");
                }


            } else {
                header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found", true, 404);
                //TODO: log error
                header("LOCATION: ".ConfigLocalProd::$website_url."NotFound/");
                die();
                throw new \Exception("Controller: $controller not found");
            }

        } else {
            header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found", true, 404);
            //TODO: log error
/
home3
/
y1ipv9n9
/
makeupbff.com
/
index.php
    //error
    $router->add('NotFound/', ['controller' => 'NotFound',
                               'action'     => 'index',]);
    #$router->add('posts/', ['controller' => 'Posts', 'action' => 'index']);
    $router->add('{controller}/{action}');
    $router->add('{controller}/{id:\d+}/{action}');
    $router->add('admin/{controller}/{action}', ['namespace' => 'Admin']);
    $router->add('admin/{controller}/{action}/{id:.+}/', ['namespace' => 'Admin']);

    $router->add('api/{controller}/{action}', ['namespace' => 'Api']);
    $router->add('api/{controller}/{action}/{id:\d+}/', ['namespace' => 'Api']);

    $router->add('tool/{controller}/{action}', ['namespace' => 'Tool']);
    $router->add('tool/{controller}/{action}/{id:\d+}/', ['namespace' => 'Tool']);

    /*
    -d($router->getRoutes());
    -d($router->getParams());
    */
    $router->dispatch($_SERVER['QUERY_STRING']);

Environment & details:

Key Value
c-foundation/clinique-staymatte-oilfree-makeup_php
empty
empty
empty
Key Value
_token 4602bf53dd07076d765db47584793fc7
Key Value
DOCUMENT_ROOT /home3/y1ipv9n9/makeupbff.com
GATEWAY_INTERFACE CGI/1.1
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_ACCEPT_ENCODING x-gzip, gzip, deflate
HTTP_HOST makeupbff.com
HTTP_USER_AGENT CCBot/2.0 (http://commoncrawl.org/faq/)
HTTP_X_HTTP_PROTO HTTP/1.0
HTTP_X_REAL_IP 54.167.75.28
PATH /bin:/usr/bin
PHPRC /home3/y1ipv9n9
QUERY_STRING c-foundation/clinique-staymatte-oilfree-makeup.php
REDIRECT_QUERY_STRING c-foundation/clinique-staymatte-oilfree-makeup.php
REDIRECT_STATUS 200
REDIRECT_UNIQUE_ID WpHe0DJ0XTcADD2riMQAAAEF
REDIRECT_URL /c-foundation/clinique-staymatte-oilfree-makeup.php
REMOTE_ADDR 54.167.75.28
REMOTE_PORT 32158
REQUEST_METHOD GET
REQUEST_URI /c-foundation/clinique-staymatte-oilfree-makeup.php
SCRIPT_FILENAME /home3/y1ipv9n9/makeupbff.com/index.php
SCRIPT_NAME /index.php
SERVER_ADDR 50.116.93.98
SERVER_ADMIN webmaster@makeupbff.com.babyitemfinder.com
SERVER_NAME makeupbff.com
SERVER_PORT 80
SERVER_PROTOCOL HTTP/1.1
SERVER_SIGNATURE
Apache Server at makeupbff.com Port 80
SERVER_SOFTWARE Apache
UNIQUE_ID WpHe0DJ0XTcADD2riMQAAAEF
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1519509200.4837
REQUEST_TIME 1519509200
argv Array ( [0] => c-foundation/clinique-staymatte-oilfree-makeup.php )
argc 1
Key Value
DOCUMENT_ROOT /home3/y1ipv9n9/makeupbff.com
GATEWAY_INTERFACE CGI/1.1
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_ACCEPT_ENCODING x-gzip, gzip, deflate
HTTP_HOST makeupbff.com
HTTP_USER_AGENT CCBot/2.0 (http://commoncrawl.org/faq/)
HTTP_X_HTTP_PROTO HTTP/1.0
HTTP_X_REAL_IP 54.167.75.28
PATH /bin:/usr/bin
PHPRC /home3/y1ipv9n9
QUERY_STRING c-foundation/clinique-staymatte-oilfree-makeup.php
REDIRECT_QUERY_STRING c-foundation/clinique-staymatte-oilfree-makeup.php
REDIRECT_STATUS 200
REDIRECT_UNIQUE_ID WpHe0DJ0XTcADD2riMQAAAEF
REDIRECT_URL /c-foundation/clinique-staymatte-oilfree-makeup.php
REMOTE_ADDR 54.167.75.28
REMOTE_PORT 32158
REQUEST_METHOD GET
REQUEST_URI /c-foundation/clinique-staymatte-oilfree-makeup.php
SCRIPT_FILENAME /home3/y1ipv9n9/makeupbff.com/index.php
SCRIPT_NAME /index.php
SERVER_ADDR 50.116.93.98
SERVER_ADMIN webmaster@makeupbff.com.babyitemfinder.com
SERVER_NAME makeupbff.com
SERVER_PORT 80
SERVER_PROTOCOL HTTP/1.1
SERVER_SIGNATURE
Apache Server at makeupbff.com Port 80
SERVER_SOFTWARE Apache
UNIQUE_ID WpHe0DJ0XTcADD2riMQAAAEF
0. Whoops\Handler\PrettyPageHandler